Hi @Ayan Usmani
To create user with ******@xyz.com id you can use User Graph API. Here is the sample request for the same.
Post https://graph.microsoft.com/v1.0/users
{
"accountEnabled": true,
"displayName": "Roshan Joshi01",
"mailNickname": "Roshan",
"userPrincipalName": "******@xyz.onmicrosoft.com",
"passwordProfile" : {
"forceChangePasswordNextSignIn": true,
"password": "Tree@1234"
}
}
As you can see using the above request I am able to create user in my test tenant.
For more details please refer to this documentation.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.