Hi @Madhusudan Vishnupurikar ,
Sorry to hear you are facing this issue. A few things to consider:
- Do you have any redirect rules configured for your app?
Based in this error message you're getting "AADSTS90102: 'redirect_uri' value must be a valid absolute URI." you may need to configure the Azure App Service to allow CORS for the domain that is serving that web page. you can do this by adding the domain to the list of allowed origins in the CORS settings for the Azure App Service.
NOTE: Don't try to use App Service CORS and your own CORS code together. When used together, App Service CORS takes precedence and your own CORS code has no effect.
- Do you have refresh or access tokens for your app? if no, you consider getting refresh tokens
"When your provider's access token (not the session token) expires, you need to reauthenticate the user before you use that token again. You can avoid token expiration by making a GET
call to the /.auth/refresh
endpoint of your application. When called, App Service automatically refreshes the access tokens in the token store for the authenticated user. Subsequent requests for tokens by your app code get the refreshed tokens. However, for token refresh to work, the token store must contain refresh tokens for your provider.
The way to get refresh tokens for your provider (Microsoft) is to:
- In https://resources.azure.com, do the following steps:
- At the top of the page, select Read/Write.
- In the left browser, navigate to subscriptions > <subscription_name> > resourceGroups > <resource_group_name> > providers > Microsoft.Web > sites > <app_name> > config > authsettingsV2.
- Click Edit. Modify the following property. "identityProviders": { "azureActiveDirectory": { "login": { "loginParameters": ["scope=openid profile email offline_access"] } } }
- Click Put.
Please read this Azure tutorial for more information: https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-oauth-tokens#extend-session-token-expiration-grace-period
Hope that helps. Please let us know if you have further questions
Thanks, Grace
--If the reply is helpful, please Upvote and Accept as answer--