Login redirect goes into a loop

I have a SPA app configured and an enterprise connection with Microsoft Azure AD. I have followed these guidelines Connect Your App to Microsoft Azure Active Directory.

When I access the app, it challenges me with an option to select Microsoft Azure AD for authentication and then it challenges me to enter my Microsoft 365 credentials. After authentication, auth0 redirects back to my application on the callback endpoint with access token. Application then uses the access token to call /userinfo endpoint and it returns response successfully. But after this I get redirected back to auth0 /authorize endpoint and it goes in endless loop till /userinfo endpoint errors out with rate limiting.

Can someone point out what I am missing?

It was an issue with an attribute not populating in access token. I added a custom rule through Auth Rules to populate that attribute and it worked fine.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.