This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.
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:
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 "https://login.microsoftonline.com/".
The correct URL should be, for example: "https://login.microsoftonline.com/333333f1-af343-4789-8ab56-333334ef92/oauth2/authorize".
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.