Teams - Get All Teams

Get a list of all teams.

GET https://dev.azure.com/{organization}/_apis/teams?api-version=5.1-preview.3
GET https://dev.azure.com/{organization}/_apis/teams?$mine={$mine}&$top={$top}&$skip={$skip}&$expandIdentity={$expandIdentity}&api-version=5.1-preview.3

URI Parameters

Name In Required Type Description
organization
path True
  • string

The name of the Azure DevOps organization.

api-version
query True
  • string

Version of the API to use. This should be set to '5.1-preview.3' to use this version of the api.

$expandIdentity
query
  • boolean

A value indicating whether or not to expand Identity information in the result WebApiTeam object.

$mine
query
  • boolean

If true, then return all teams requesting user is member. Otherwise return all teams user has read access.

$skip
query
  • integer
int32

Number of teams to skip.

$top
query
  • integer
int32

Maximum number of teams to return.

Responses

Name Type Description
200 OK

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.project Grants the ability to read projects and teams.

Examples

Sample Request

GET https://dev.azure.com/fabrikam/_apis/teams?$mine=True&api-version=5.1-preview.3

Sample Response

{
  "value": [
    {
      "id": "564e8204-a90b-4432-883b-d4363c6125ca",
      "name": "Quality assurance",
      "url": "https://dev.azure.com/fabrikam/_apis/projects/eb6e4656-77fc-42a1-9181-4c6d8e9da5d1/teams/564e8204-a90b-4432-883b-d4363c6125ca",
      "description": "Testing staff",
      "identityUrl": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/564e8204-a90b-4432-883b-d4363c6125ca"
    },
    {
      "id": "66df9be7-3586-467b-9c5f-425b29afedfd",
      "name": "Fabrikam-Fiber-TFVC Team",
      "url": "https://dev.azure.com/fabrikam/_apis/projects/eb6e4656-77fc-42a1-9181-4c6d8e9da5d1/teams/66df9be7-3586-467b-9c5f-425b29afedfd",
      "description": "The default project team.",
      "identityUrl": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/66df9be7-3586-467b-9c5f-425b29afedfd"
    }
  ],
  "count": 2
}

Definitions

Identity
IdentityDescriptor

An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID.

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.

WebApiTeam

Identity

Name Type Description
customDisplayName
  • string

The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database)

descriptor

An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID.

id
  • string
isActive
  • boolean
isContainer
  • boolean
masterId
  • string
memberIds
  • string[]
memberOf

An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID.

members

An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID.

metaTypeId
  • integer
properties

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.

providerDisplayName
  • string

The display name for the identity as specified by the source identity provider.

resourceVersion
  • integer
socialDescriptor
  • string
subjectDescriptor
  • string
uniqueUserId
  • integer

IdentityDescriptor

An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID.

Name Type Description
identifier
  • string

The unique identifier for this identity, not exceeding 256 chars, which will be persisted.

identityType
  • string

Type of descriptor (for example, Windows, Passport, etc.).

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

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.

WebApiTeam

Name Type Description
description
  • string

Team description

id
  • string

Team (Identity) Guid. A Team Foundation ID.

identity

Team identity.

identityUrl
  • string

Identity REST API Url to this team

name
  • string

Team name

projectId
  • string
projectName
  • string
url
  • string

Team REST API Url