WorkItem rest api issue when using token from api management

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 ?

2 Likes

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.

1 Like

It’s what I thought, no identity linked, but was asking as I didn’t found anything about this type of restrictions in documentation for V3 api.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.