I have an Azure App Registration that has been working ok for a few weeks. A Blazor Server App, queries the roles of the user with the following code:
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
var user = authState.User;
foreach (var claim in user.Claims.Where(x => x.Type == "roles"))
Previously, the AAD App Registration had 3 roles defined, but I've now added a new "App.Admin" role:
If I browse the "Enterprise Application" for the app registration, then I can see that my user is currently assigned the old roles:
My problem is, I'm unable to assign the new role within 30 minutes of creating it.
So, I spent the first 40 minutes wondering if I was doing something wrong. Then I started putting this SO post together and noticed that the role assignment was now available.
I decided to publish this post in the hope that it help others that run into the same problem.
Is this a problem Microsoft are aware of? Maybe a warning message should be added to the App Registrations\App Roles blade?
CodePudding user response:
I tested in multiple tenants in my test environments, and it is working fine for me. AFAIK it is not issue from Microsoft end as Azure AD does sync with simultaneous output of successful operation.
Note : Sometimes browser cache may be the reason of this kind of issue. Would suggest you clear the Browers cache and do logout and login again in a portal or try in incognito mode and see it is working or not. If it is still the same issue please reach out to support they can better help here.