Azure AD B2C Tenant

Ravindra Pawar 21 Reputation points
2021-06-07T05:18:14.8+00:00

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.

  1. 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.
  2. 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

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,734 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,663 questions
{count} votes