Azure AD B2C Tenant
Hello Team,
We have an Azure AD B2C tenant.
I am adding users to the Azure AD B2C using MS Graph API (POST https://graph.microsoft.com/v1.0/users) from our custom application.
I have below questions in this particular scenario.
- While creating an user the password profile is mandatory(an initial password is required). Is it possible to create an user with Auto-generated password using MS Graph API? The Azure portal provides this functionality.
- After the user is created I need to send an welcome email to the user. I tried sending the email using MS Graph API (POST https://graph.microsoft.com/v1.0/me/sendMail) but getting error as below:
{"error":{"code":"OrganizationFromTenantGuidNotFound","message":"The tenant for tenant guid '5XXXXd93-0XXc-4XXc-a4XX-ebXXXb92XX8X' does not exist.","innerError":{"oAuthEventOperationId":"bXXX2de3-XXX5-4XX9-XX7c-eXXX41eXXXX7","oAuthEventcV":"1XXXqoXXXXCxkI/yFXXXXw.1.1","errorUrl":"https://aka.ms/autherrors#error-InvalidTenant","requestId":"cXXXXe5X-XXX7-4XXX-aXX0-8XXXX9c8XXX5","date":"2021-06-07T05:08:27"}}}
How to send an e-mail using the MS Graph API with Azure AD B2C Tenant? Do we need to have Exchange online license under O365 subscription? If yes, how to configure it with Azure AD B2C Tenant if we already have the O365 subscription in other Azure AD tenant.
Best Regards,
Ravindra