Accounts

Last Update: 6/30/2017

api-version = 3.0-preview.2

If you haven't already, look at the information on getting started with these APIs.

Get a list of accounts

GET https://app.vssps.visualstudio.com/_apis/Accounts?[memberId={GUID}][&ownerId={GUID}]&api-version=3.2-preview
Parameter Type Notes
Query
api-version string Version of the API to use.
memberId GUID ID of the user (use Profile or Teams for ID)
ownerId GUID ID of the user (use Profile or Teams for ID)

By member ID

Sample request

GET https://app.vssps.visualstudio.com/_apis/Accounts?memberId=d6245f20-2af8-44f4-9451-8107cb2767db&api-version=3.2-preview

Sample response

Status code: 200
{
  "count": 2,
  "value": [
    {
      "accountId": "6affcbef-fe5d-44c6-8a29-439b79aaa118",
      "accountUri": "https://Fabrikam-Fiber-Inc.vssps.visualstudio.com:443/",
      "accountName": "Fabrikam-Fiber-Inc",
      "properties": {}
    },
    {
      "accountId": "bf83696f-383b-4980-95b5-1f1127640a8a",
      "accountUri": "https://NormalPaulk.vssps.visualstudio.com:443/",
      "accountName": "NormalPaulk",
      "properties": {}
    }
  ]
}

By owner ID

Sample request

GET https://app.vssps.visualstudio.com/_apis/Accounts?ownerId=d6245f20-2af8-44f4-9451-8107cb2767db&api-version=3.2-preview

Sample response

Status code: 200
{
  "count": 1,
  "value": [
    {
      "accountId": "bf83696f-383b-4980-95b5-1f1127640a8a",
      "accountUri": "https://NormalPaulk.vssps.visualstudio.com:443/",
      "accountName": "NormalPaulk",
      "properties": {}
    }
  ]
}

Q&A

Q: Can I use basic auth with the profiles API?

A: No, you must use OAuth.