We are trying to use the built-in Authentication from an Azure Web App. The first part of it seems so simple and painless, but after the user is authenticated, we’re having no success in reading their group membership so that our app can present the right experience.
What we have working
- Azure Web App – authentication o Authenticating to AAD – used the “express” setup to configure
- We get the X-MS-X-MS-TOKEN-AAD-ACCESS-TOKEN (and it’s friends) from the header and can decode the claim we want (email address) and use it in the app
What we have not been able to figure out:
- How to use these headers to request their record from Azure AD to determine their group membership and other claims not passed in the token (for security reasons)
- How (or if?) to refresh their token so they aren’t kicked out of the app before they are finished when their token expires. There’s an X-MS-TOKEN-AAD-REFRESH-TOKEN available in the headers. What we don’t know is if the Azure Web App Authentication handles refreshes for us, or if we have to do something with it ourselves.
Authentication up to this point has been way simpler than the “roll your own” we have been working on, so I’m hopeful that the built in Azure Web App Authentication is an easy solution.
(The web app contains an application written in ColdFusion deployed on Lucee in a Container. But I suspect that any solution to this is likely very cross platform.)
Any suggestions?