Hi @Charan Singh • Thank you for reaching out.
There are 2 options that you have for this purpose. You can either use Azure AD B2B or Azure AD B2C tenants with your ASP.NET Core application, as per the instructions I have provided in my tutorial docs below:
1 . Add Azure AD B2B authentication to an ASP.NET Core web app
- If you choose this option, you need to add a self-service sign-up user flow to an app and users will get an option to create their account in Azure AD by clicking on No account? Create one! link on the sign in page. For the Role, you can use custom attribute as mentioned in This Document. If by role, you are referring to Directory Role, that has to be assigned or requested manually via PIM. 2 . Add Azure AD B2C authentication to an ASP.NET Core web app
- If you choose this option, you need to Create user flow in Azure Active Directory B2C and users can click on sign-up now link on the sign-in page to create their accounts in Azure AD B2C tenant. You have the option to create a custom attribute in B2C to be used to store the role of the user.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.