You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which made me banging my head on the keyboard, because the error message was quite far from the original issue. I dived into the library with prints to figure it out. As I understood, the problem is that AD FS UserInfo endpoint does not expect client requests additional claims, it simply does not support it (ADFS FAQ)
So, the original error returned by provider when client requests userinfo_endpoint on callback phase is below
MSIS9921: Received invalid UserInfo request. Audience 'microsoft:identityserver:<my_identifier>' in the access token is not same as the identifier of the UserInfo relying party trust 'urn:microsoft:userinfo'.
Thanks extra_authorize_params option I was able to set the resource uri that the provider expects. Here is my working config
Maybe it makes sense to add a note about resource uri for AD FS. Or maybe to add an option that skips requesting userinfo_endpoint at all. What do you think?
I'm not sure it is the case for having another omniauth provider.
P.S. Minor NOTE for those who will be using this as manual. After fixing the issue, you may still be getting "Access Token Invalid or Expired" again from time to time. In my case it totally gone after I configured ntp on server.
The text was updated successfully, but these errors were encountered:
I am not 100% on what your problem is caused by, but I am also in need to skipping requesting the userinfo_endpoint #145.
But it seems to be used for access_tokens somehow
Thank you for opening this issue! I encountered the same error trying to use AD FS issuer with openid_connect on a self-managed GitLab. Applying your suggestions, spryffee, I encounter now a different error: Sign-in using Openid Connect auth failed: Email can't be blank . I got one step further thanks to your invested time. 🎉
Hello. Thanks all who maintain and contribute to this gem.
I use it for SSO with ADFS in my project. While setting up I was getting the error
which made me banging my head on the keyboard, because the error message was quite far from the original issue. I dived into the library with prints to figure it out. As I understood, the problem is that AD FS UserInfo endpoint does not expect client requests additional claims, it simply does not support it (ADFS FAQ)
So, the original error returned by provider when client requests userinfo_endpoint on callback phase is below
MSIS9921: Received invalid UserInfo request. Audience 'microsoft:identityserver:<my_identifier>' in the access token is not same as the identifier of the UserInfo relying party trust 'urn:microsoft:userinfo'.
Thanks extra_authorize_params option I was able to set the resource uri that the provider expects. Here is my working config
Maybe it makes sense to add a note about resource uri for AD FS. Or maybe to add an option that skips requesting userinfo_endpoint at all. What do you think?
I'm not sure it is the case for having another omniauth provider.
P.S. Minor NOTE for those who will be using this as manual. After fixing the issue, you may still be getting "Access Token Invalid or Expired" again from time to time. In my case it totally gone after I configured ntp on server.
The text was updated successfully, but these errors were encountered: