I'm currently developing a web app in C#. I'm using Azure AD to store the user infomation, so I would like to be able to change the password at some point if the user wishes to do so.
Currently the way I'm changing the password is by using a http-patch call to https://graph.windows.net/{tenentId}/users/{userkey}?api-version=1.5 with a json looking like this:
{
"passwordProfile":
{
"password":"Test!23456",
"forceChangePasswordNextLogin" : false
}
}
Last week this worked just fine. But when I tried today it didnt work. Any ideas?
I found the error. I was using user_id as UPN and you cant use a password that have the UPN in it. So I changed the way I made the UPN and it works like a charm!