In K2 Five, when trying to use APIs services with AAD authentication and clicking on the "Setup AAD Consent" button, an error HTTP 404 is displayed.


The error appears as:

"HTTP 404 error That’s odd... Microsoft Edge can’t find this page".

A link that looks like the example below is visible on the address bar:

Troubleshooting Steps

When looking at the URL that is opened when the consent button is clicked, you will notice that it is missing a GUID after the "".

The correct URL should be, for example: "".

The "setup AAD Consent" button relies on the Authorization Endpoint of the OAuth resource of type "Microsoft Online AppOnly". This can be seen from Management Site > Authentication > OAuth > Resources.

To resolve this issue, please edit the resources to include the tenant ID.