When using APIs services with AAD authentication and clicking "Setup AAD Consent," returns HTTP 404 error

  • 15 February 2022
  • 0 replies
  • 108 views

Userlevel 5
Badge +20
 

When using APIs services with AAD authentication and clicking "Setup AAD Consent," returns HTTP 404 error

kbt141241

PRODUCT
K2 Five 5.0
BASED ON
K2 Five 5.0
TAGS
K2 API
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.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

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.

Symptoms

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:
https://login.microsoftonline.com/oauth2/authorize?client_id=239228c92-2222-22f2-b22e-fe2222ac222f&response_type=code&
redirect_uri=https://k2.denallix.com/Identity/Token/oauth/2/Authorized&resource=
https://graph.windows.net&prompt=admin_consent

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 "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.
 

Image


0 replies

Be the first to reply!

Reply