Microsoft Graph API - Updating password -




i using microsoft graph api sample project. able login fine.

i trying update password of user logged in using following code:

public async task<bool> updatepassword(graphserviceclient graphclient, string newpassword) {     user me = await graphclient.me.request().updateasync(new user     {         passwordprofile = new passwordprofile         {             password = newpassword,             forcechangepasswordnextsignin = false         },     });     return true; } 

when execute code, following error:

{   status: 500   message: "no offeractions provided validating consent."   internal error: "empty offeractions array." } 

any idea might doing incorrectly?

i gave access "users" related via app registration portal @ https://apps.dev.microsoft.com

thank you!

there baked-in changepassword() function you'll want use this:

await graphclient.me.changepassword("current-pwd, "new-pwd").request().postasync(); 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -