question

RandallRivera-3360 avatar image
0 Votes"
RandallRivera-3360 asked saldana-msft edited

Active Directory B2C : cannot add role to registered applications

I have followed everything here https://docs.microsoft.com/en-us/azure/active-directory-b2c/microsoft-graph-get-started?tabs=app-reg-ga

but when i get to this part

57381-image.png




in #6, only users in the local active directory is showing, no registered apps are showing here.
Because of this, i cannot perform a user update password using a microsoft graph token from a clientId.

What am i missing? i need to add the user management role to the registered application.

azure-ad-b2cmicrosoft-graph-users
image.png (51.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered RandallRivera-3360 commented

Hi @RandallRivera-3360 · Thank you for reaching out.

There seems to be an issue with the UI. I will report the issue to the product team and get it addressed.

However, as of now, you can follow below steps and use PowerShell to add application to the User Administrator role:

  1. Install latest Azure AD PowerShell Module.

  2. Run Connect-AzureAD -TenantId Your_B2CTenant.onmicrosoft.com and sign in with Global Administrator account in that tenant.

  3. Run Get-AzureADDirectoryRole cmd and copy the object id of the User Administrator role.

  4. Navigate to Azure AD > Enterprise Applications > Search the app and copy the object id of the app.

  5. Run Add-AzureADDirectoryRoleMember -ObjectId object_ID_copied_in_Step3 -RefObjectId object_ID_copied_in_Step4 cmdlet.

To verify, navigate to Azure AD B2C > Roles and Administrators > User Administrator. You should see the application present under this role.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you this worked!

0 Votes 0 ·