I am trying to execute B2C user creation on our company's Azure Directory. As reference, I use this site from Microsoft, and the .DotNet example in it.
I thoroughly follow the example, and I get to the point where I get authenticated, and I am able to extract the AD users in the directory. Here is the sample request I generated.
GET https ://graph.windows.net/mycompany/users?api-version=beta
But when I get to the part of creating a sample user in the directory, I get the error response "One or more properties contains invalid values".
POST https ://graph.windows.net/mycompany/users?api-version=beta
Here is the payload, I used, which is the exact same payload used in the site's example for user creation. This is in JSON format.
{"accountEnabled": true,"alternativeSignInNamesInfo": [{"type": "emailAddress", "value": "[email protected]"}],"creationType": "NameCoexistence", "displayName": "Joe Consumer", "mailNickname": "joec","passwordProfile": {"password": "P@ssword!","forceChangePasswordNextLogin": false},"passwordPolicies": "DisablePasswordExpiration"}
This payload conforms with the requirements based on the User Creation requirements from Microsoft, also, it is the exact same payload in the site's example, which is why it is strange that I am receiving the a message that one of the properties has invalid values. The worse thing is, the response does not explicitly state which value is the source of the problem.
Any help would be appreciated.