I am new to Azure integration with web app. Can I know is there any tutorial available to assign role to user that login with Azure AD? Such as UserManager.AddToRole(userId, "Admin")
for a standard login. I need a full guide on how to assign role to user that login with Azure AD. Thanks!
PS: Im using ASP.NET with WebForm, not MVC.
First off, you need to figure out how you implement authorization in your application. Azure AD has 3 primary mechanisms. From: https://azure.microsoft.com/en-us/documentation/articles/guidance-multitenant-identity-app-roles/
If you pick this approach, you can POST to the Azure AD Graph's /appRoleAssignments to assign a group or user to an application role like so:
See this link for more info: https://msdn.microsoft.com/library/azure/ad/graph/api/entity-and-complex-type-reference#AppRoleAssignmentEntity
If you pick this approach, you can POST to the Azure AD Graph's /groups to assign a user to a group like so:
See this link for more info: https://msdn.microsoft.com/library/azure/ad/graph/api/groups-operations#AddGroupMembers
If you pick this approach, then you'd basically continue to use AddToRole.
Be sure to check out the first link I referenced for details on how to implement the first two approaches.