Hi @CarlZhao-MSFT ,
After researching for hours, finally I found the solution. I submitted as a json rather than using the method provided by PHP SDK. Working code is as follows.
Thank you for your time anyways :)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'm using Microsoft Graph API to add users in to Azure AD B2C tenant. I follow the example 2 of following link.
https://learn.microsoft.com/en-us/graph/api/user-post-users?view=graph-rest-1.0&tabs=http
I set all necessary parameters but API returns an error. Please see following screenshot for the error.
Please see the following screenshot for the parameters I set for the API.
FYI I have set all necessary permissions as well.
Your support to solve this issue is much appreciated. My client is waiting for me to finish this ASAP.
Thanks!
Zahmi
Hi @CarlZhao-MSFT ,
After researching for hours, finally I found the solution. I submitted as a json rather than using the method provided by PHP SDK. Working code is as follows.
Thank you for your time anyways :)
The /users
endpoint you are currently using is to create a work account instead of inviting users. If you are inviting users, you should use the /invitations
endpoint. https://learn.microsoft.com/en-us/graph/api/invitation-post?view=graph-rest-1.0&tabs=http
If an Answer is helpful, please click "Accept Answer" and upvote it.
Thank you for your reply. However I'm using the correct domain name. You can refer the below image.
I even set all the parameters according to the Microsoft Graph documentation for creating a user in Azure B2C. I'm not sure what I'm missing here.