Reputation: 153
Here is my scenario:
I have a Portal service where User's can create account. Their default 'Role' is User. In my portal, I have an Admin portal that allows Admin Users to create other Admin Users (done using Microsoft Graph SDK). Except, I can not create an Admin User as there does not yet exist an Admin User on this Portal.
In order for a User to be considered an Admin, one of the requirement is that their Custom User Attribute on the Azure portal identify the Users as an Admin through the 'Role' attribute.
So since a User can not create an Admin User since they can't see the page without being an Admin, is there a way for me to edit the User attribute of a Custom attribute on the Azure AD B2C page?
If not, what will be a better way to approach this scenario? I do know this can be done by Microsoft Graph SDK, but I want to see if I can set an initial Admin for a User's Custom Attribute without calling the Microsoft Graph SDK, as that call does a "Are you Admin" check.
Upvotes: 0
Views: 85
Reputation: 46773
One way to do this might be to use the Profile Edit flow.
You log in with a user who has the correct rights and then type in the user's name for whom you want the custom attribute.
Then, the flow adds the attribute to the user.
You might need a custom policy to do this?
Upvotes: 0