contextUserId is missing privilege ae5c41f0-e823-4cb9-b25a-8ef020201973 error in WebAPI


We were getting the below error while using impersonation in our WebAPI

2019-02-26_1044

Searching for the privilege id we got the following detail

{“@odata.etag”:”W/\”47875405\””,”overwritetime”:”1900-01-01T00:00:00Z”,”solutionid”:”fd140aad-4df4-11dd-bd17-0019b9312238″,”introducedversion”:”8.2.0.0″,”canbebasic”:false,”canbedeep”:false,”ismanaged”:false,”accessright”:32,”canbeglobal”:true,”privilegeid”:”ae5c41f0-e823-4cb9-b25a-8ef020201973″,”canbeentityreference”:false,”privilegerowid”:”1b218262-afac-4859-b9e0-c8c0f6550231″,”componentstate”:0,”canbelocal”:false,”versionnumber”:47875405,”canbeparententityreference”:false,”name”:”prvActOnBehalfOfAnotherUser“},

So the user was missing the Act On Behalf Of Another User privilege

https://nishantrana.me/2018/01/30/user-does-not-have-the-privilege-to-act-on-behalf-another-user-error-while-using-impersonation-in-web-api-in-dynamics-365/

Hope it helps..

 

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Please share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.