I try to update the mobile number using graph as an application. I'm able to get a token, read the properties and can updates other properties.
Then i learned, that mobile is somewhat special, because is can be user for phone authentication.
I followed phoneauthenticationmethod-update
and my token has "UserAuthenticationMethod.ReadWrite.All"
My first try:
Invoke-RestMethod `
-Method PUT `
-Headers @{"Authorization" = "Bearer $($token)"} `
-ContentType "application/json" `
-URI "https://graph.microsoft.com/beta/users/user%40msxfaq.de/authentication/phoneMethods/3179e48a-750b-4051-897c-87b9720928f7" `
-body "{""phoneNumber"": ""+495251304"",""phoneType"": ""mobile"",}"
Error was
The requested authentication method id of [3179e48a-750b-4051-897c-87b9720928f7] was not found for this user, and so it cannot be updated
Seconds Try
Invoke-RestMethod `
-Method PUT `
-Headers @{"Authorization" = "Bearer $($token)"} `
-ContentType "application/json" `
-URI "https://graph.microsoft.com/beta/users/user%40msxfaq.de/authentication/phoneMethods" `
-body "{""phoneNumber"": ""+495251304"",""phoneType"": ""mobile"",}"
I get the error
{"error":{"code":"UnknownError","message":"{\"Message\":\"No HTTP resource was found that matches the request URI 'https://mface.windowsazure.com/odata/users(user%40msxfaq.de')/authentication/phoneMethods'.","MessageDetail":"No type was found that matches the controller named 'users'
There are other blogs like 1257359 and comments have same errors but no solution.
I know that it is beta but maybe it is a bug?
Frank
