-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Microsoft Entra integration #95
Comments
The issuer check must be made optional or pass the issuer received from the token. |
bufferoverflow
added a commit
to bufferoverflow/openid_connect
that referenced
this issue
Jul 7, 2024
This is especially useful when using Microsoft Entra ID common endpoint, as the issuer could be from another tenant. When using this parameter it is recommended to set the audience as this stays the same even if the issuer is from another tenant. Related omniauth/omniauth_openid_connect#166 Closes nov#95
bufferoverflow
added a commit
to bufferoverflow/openid_connect
that referenced
this issue
Jul 7, 2024
This is especially useful when using Microsoft Entra ID common endpoint, as the issuer could be from another tenant. When using this parameter it is recommended to set the audience as this stays the same even if the issuer is from another tenant. Related omniauth/omniauth_openid_connect#166 Closes nov#95
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
According to this part of Microsoft Entra documentation, the .well-known document is an variable URL that we need to set the {tenant} as one of the following options:
I'm using 'common' option and the problem is that in the document (https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration), the "Issuer" key has a {tenantid} in the url.
and when i call the discover method like this:
discovery = OpenIDConnect::Discovery::Provider::Config.discover!('https://login.microsoftonline.com/common/v2.0')
2 errors occur:The first one i solved it with
OpenIDConnect.validate_discovery_issuer = false
, the second i cannot solve because is a validation that i can't skip.openid_connect/lib/openid_connect/discovery/provider/config/response.rb
Line 60 in e1eb8ea
I commented the line above to continue the authentication flow and check if these were the only problems and the discover! method ran without any other problems, but the
id_token.verify!
fails and gives a 'Invalid ID token: Issuer does not match' error, because the id_token returned by Microsoft has a iss: 'https://login.microsoftonline.com/9040d.../v2.0' and the discovery.issuer is 'https://login.microsoftonline.com/{tenantid}/v2.0 'There is something that we can do to resolve the compatibility with Microsoft Entra?
Thanks!
PS: The problem does not occur with specific Microsoft Entra tenant, the problem occurs when i use the 'common' option.
The text was updated successfully, but these errors were encountered: