Teams - Create

Create a team in a team project.

Possible failure scenarios Invalid project name/ID (project doesn't exist) 404 Invalid team name or description 400 Team already exists 400 Insufficient privileges 400

POST https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams?api-version=6.0

URI Parameters

Name In Required Type Description
organization
path True
  • string

The name of the Azure DevOps organization.

projectId
path True
  • string

The name or ID (GUID) of the team project in which to create the team.

api-version
query True
  • string

Version of the API to use. This should be set to '6.0' to use this version of the api.

Request Body

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

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_manage Grants the ability to create, read, update, and delete projects and teams.

Examples

Sample Request

POST https://dev.azure.com/fabrikam/_apis/projects/8e5a3cfb-fed3-46f3-8657-e3b175cd0305/teams?api-version=6.0

{
  "name": "My new team"
}

Sample Response

{
  "id": "8e8aa4ff-848a-474a-9033-93190137c8e4",
  "name": "My New Team",
  "url": "https://dev.azure.com/fabrikam/_apis/projects/8e5a3cfb-fed3-46f3-8657-e3b175cd0305/teams/8e8aa4ff-848a-474a-9033-93190137c8e4",
  "description": "",
  "identityUrl": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8e8aa4ff-848a-474a-9033-93190137c8e4"
}

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

Identity Identifier. Also called Storage Key, or VSID

isActive
  • boolean

True if the identity has a membership in any Azure Devops group in the organization.

isContainer
  • boolean

True if the identity is a group.

masterId
  • string
memberIds
  • string[]

Id of the members of the identity (groups only).

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

Subject descriptor of a Graph entity.

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