How to add users in azure devops through Postman REST API

Viewed 249

I'm using collections (not organization) in azure devops and trying to add users in teams (under project settings) through Postman REST API.

I can retrieve teams details using PAT auth:

GET https://devops.company.com/tfs/COL/_apis/projects/My-WORK/teams?api-version=6.0

Success Response:

{
    "value": [
        {
            "id": "01xxccrayr-a443-600d-db0d-12435",
            "name": "MY-WORK Team",
            "url": "",
            "description": "team description",
            "identityUrl": "xxxx",
            "projectName": "MY-WORK",
            "projectId": "8540tuyfred-qawsd-fre432-fre3-57wedsa1546thyf"
        }
    ],
    "count": 1
}

but unable to add users into specific teams through Postman:

PUT https://devops.company.com/tfs/COL/_apis/GroupEntitlements/{teamID}/members/{memberId}?api-version=6.0

e.g. PUT https://devops.company.com/tfs/COL/_apis/GroupEntitlements/01xxccrayr-a443-600d-db0d-12435/members/anyemailid@not.com?api-version=6.0

Error Response:

<head>
    <title>Page not found. - Azure DevOps Server</title>
    <style type="text/css">

Also, I tried below urls but didn't work:

How to add team members in Azure Devops via API? Also Groups API does not work

https://docs.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/members/add?view=azure-devops-rest-5.1

Any input would be helpful, Thank you.

1 Answers
Related