Hi,
I used the SDK powershell module to explain, but it’s the same issue when I used the rest api directly from postman.
When I use Get-WorkItem -id “” using a PAT it works, then with the same itemid I tried using a clientid/secretid generated from api management screen, and it fails with status “400” without much error…
Same with method Complete-WorkItem, using PAT it works, but using api management it fails.
Do you know if there are some restrictions on api reachable using api management tokens ?
For Work Item APIs, they will work only if calling user is either an admin, or the owning/current user making the request.
When you are trying using PAT, that user context is probably for an admin user and so it works but when using client id and secret, there is no user context and hence its failing.