The default Azure AD (B2B) only allows you to add users from other Azure AD tenants. If you want to use consumer accounts like live, gmail etc. you will want to look at using Azure AD B2C which is an additional service.
create new users who does not have microsoft account
Hi Team,
I want to use Azure active directory as the authentication system for a project. Does Microsoft Azure only allow users with Microsoft accounts to Sign Up?.
I want to allow all users (live, outlook, gmail, yahoo etc.) to create account in my project.
Is there a way to do this using Graph API?.
Thanks.
P.S. I am thinking of using it like AWS Cognito service
2 answers
Sort by: Most helpful
-
-
AmanpreetSingh-MSFT 56,741 Reputation points
2020-05-21T12:34:18.307+00:00 Hi @Joe S George ,
For this purpose you can go to https://developer.microsoft.com/en-us/graph/graph-explorer/preview and make below graph call and the given body:
POST
https://graph.microsoft.com/v1.0/invitations
BODY:
{"invitedUserEmailAddress":"username@example.com","inviteRedirectUrl":"https://myapp.com","sendInvitationMessage":true}
Users can sign-in and access resources after redeeming the invite sent in the email. You will also get the redemption link in response to the above call that you can share with the users by any other means as well.
For Azure AD B2C social identities, you can use the graph call as mentioned here: https://learn.microsoft.com/en-us/graph/api/user-post-users?view=graph-rest-1.0&tabs=http#example-2-create-a-user-with-social-and-local-account-identities
-----------------------------------------------------------------------------------------------------------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.