I tried to create update login username or email through Microsoft graph explorer but I am unable to do both actions. Probably the json data I am supplying might not be in correct format. I am logged in with admin account, used PATCH method and successfully updated information by supplying below codes:
{
"displayName": "AAAlica",
"givenName": "Mews",
"passwordProfile": {
"password": "P@ssword!"
}
}
I don't know what attributes and values should I provide in order to change login username/email address. I tried different format like
{
"displayName": "AAAnamika",
"givenName": "MMews",
"userPrincipalName": "newusername@[email protected]"
}
and always getting error.
References:
- graph explorer: Microsoft graph explorer
- documentation: Microsoft graph api documentation
I noticed that the userPrincipalName in your post is invalid which contains two
@
.The correct format should be like
[email protected]
. Here is the detail description for the UPN property:The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains.