Federated identity management using Active Directory Federation Services
Hi @Artu Sa ,
Yes, you can catch this error by making an acquireToken call, checking for the error code in the callback, and then redirecting the user to log back in again if you catch that error. So you would handle the acquireToken failure and invoke the acquireTokenRedirect. There is an example of this implementation here. There is also an iframe implementation example added here using a message handler to respond to window messages.
Note also that this error can occur if third party cookies have been disabled in your browser, and you can re-enable third party cookies in your browser to prevent this error from occurring in the first place. If you are using Chrome in incognito mode, the default settings it block third-party cookies.
Additional reference: AADSTS50058 error in Javascript.
Let me know if you have further questions.
-
If the information helped you, please Accept the answer. This will help us and other community members as well.