'DevOps API - update user's entitlements using Power Automate
I would like to automate the process of updating users' entitlements in DevOps. Shortly saying, when someone requests the access to a specific project I want:
Flow to trigger approval -> when it is approved -> flow add the selected entitlement to the user
I have a problem with the last part where I am using the DevOps HTTP request connector:
where:
URI:
"https://dev.azure.com/"MyOrgName"/_apis/userentitlements/5b0da6ff-c071-43aa-9178-7af9d6173dc4?api-version=5.0-preview.2"
Headers:
Content-Type application/json-patch+json
Body:
[
{
"op":0,
"path":"/projectEntitlements",
"value":{"projectRef":{"id":"3477b8aa-ff18-4f55-a632-3bbba54dbdff"},
"group":{"groupType":2}}
}
]
I am receiving an error code 400 - not authorized. I know from my experience, that such an error doesn't need to mean missing authorization settings but just an incorrect URI or body in an HTTP request.
Any idea what can be wrong with my request or what can be the workaround for this?
Thank you in advance for your help.
Jacek
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

