Accounts - List
Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
GET https://app.vssps.visualstudio.com/_apis/accounts?api-version=7.1
GET https://app.vssps.visualstudio.com/_apis/accounts?ownerId={ownerId}&memberId={memberId}&properties={properties}&api-version=7.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.1' to use this version of the api. |
member
|
query |
string (uuid) |
ID for a member of the accounts. |
|
owner
|
query |
string (uuid) |
ID for the owner of the accounts. |
|
properties
|
query |
string |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Account[] |
successful operation |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Description |
---|---|
vso.profile | Grants the ability to read your profile, accounts, collections, projects, teams, and other top-level organizational artifacts. |
Examples
By member |
By owner |
By member
Sample request
GET https://app.vssps.visualstudio.com/_apis/accounts?memberId=d6245f20-2af8-44f4-9451-8107cb2767db&api-version=7.1
Sample response
{
"count": 2,
"value": [
{
"accountId": "6affcbef-fe5d-44c6-8a29-439b79aaa118",
"accountUri": "https://vssps.dev.azure.com/Fabrikam-Fiber-Inc/",
"accountName": "Fabrikam-Fiber-Inc",
"properties": {}
},
{
"accountId": "bf83696f-383b-4980-95b5-1f1127640a8a",
"accountUri": "https://vssps.dev.azure.com/NormalPaulk/",
"accountName": "NormalPaulk",
"properties": {}
}
]
}
By owner
Sample request
GET https://app.vssps.visualstudio.com/_apis/accounts?ownerId=d6245f20-2af8-44f4-9451-8107cb2767db&api-version=7.1
Sample response
{
"count": 1,
"value": [
{
"accountId": "bf83696f-383b-4980-95b5-1f1127640a8a",
"accountUri": "https://NormalPaulk.vssps.visualstudio.com:443/",
"accountName": "NormalPaulk",
"properties": {}
}
]
}
Definitions
Name | Description |
---|---|
Account | |
Account |
Current account status |
Account |
Type of account: Personal, Organization |
Properties |
The class represents a property bag as a collection of key-value pairs. Values of all primitive types (any type with a |
Account
Name | Type | Description |
---|---|---|
accountId |
string (uuid) |
Identifier for an Account |
accountName |
string |
Name for an account |
accountOwner |
string (uuid) |
Owner of account |
accountStatus |
Current account status |
|
accountType |
Type of account: Personal, Organization |
|
accountUri |
string |
Uri for an account |
createdBy |
string (uuid) |
Who created the account |
createdDate |
string (date-time) |
Date account was created |
hasMoved |
boolean |
|
lastUpdatedBy |
string (uuid) |
Identity of last person to update the account |
lastUpdatedDate |
string (date-time) |
Date account was last updated |
namespaceId |
string (uuid) |
Namespace for an account |
newCollectionId |
string (uuid) |
|
organizationName |
string |
Organization that created the account |
properties |
Extended properties |
|
statusReason |
string |
Reason for current status |
AccountStatus
Current account status
Value | Description |
---|---|
deleted |
This account is part of deletion batch and scheduled for deletion. |
disabled |
This hosting account is disabled. |
enabled |
This hosting account is active and assigned to a customer. |
moved |
This account is not mastered locally and has physically moved. |
none |
AccountType
Type of account: Personal, Organization
Value | Description |
---|---|
organization | |
personal |
PropertiesCollection
The class represents a property bag as a collection of key-value pairs. Values of all primitive types (any type with a TypeCode != TypeCode.Object
) except for DBNull
are accepted. Values of type Byte[], Int32, Double, DateType and String preserve their type, other primitives are retuned as a String. Byte[] expected as base64 encoded string.
Name | Type | Description |
---|---|---|
count |
integer (int32) |
The count of properties in the collection. |
item |
object |
|
keys |
string[] |
The set of keys in the collection. |
values |
string[] |
The set of values in the collection. |