Groups - Update

Update the properties of an Azure DevOps group.

Currently limited to only changing the description and account name.

PATCH https://vssps.dev.azure.com/{organization}/_apis/graph/groups/{groupDescriptor}?api-version=6.0-preview.1

URI Parameters

Name In Required Type Description
groupDescriptor
path True

string

The descriptor of the group to modify.

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 '6.0-preview.1' to use this version of the api.

Request Body

Media Types: "application/json-patch+json"

Name Type Description
from

string

The path to copy from for the Move/Copy operation.

op

Operation

The patch operation

path

string

The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-).

value

object

The value for the operation. This is either a primitive or a JToken.

Responses

Name Type Description
200 OK

GraphGroup

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.graph_manage Grants the ability to read user, group, scope and group membership information, and to add users, groups and manage group memberships

Examples

Sample Request

PATCH https://vssps.dev.azure.com/{organization}/_apis/graph/groups/{groupDescriptor}?api-version=6.0-preview.1

[
  {
    "op": "replace",
    "path": "/description",
    "from": null,
    "value": "Updated description"
  }
]

Sample Response

{
  "subjectKind": "group",
  "description": "Updated description",
  "domain": "vstfs:///Framework/IdentityDomain/10feb381-82c3-4902-8e1f-840299a48ae4",
  "principalName": "[Fabrikam]\\Developers-ba8cfcdb-b7fd-45d5-86ab-9888d0222f84",
  "mailAddress": null,
  "origin": "vsts",
  "originId": "9efb8978-a26f-4b52-aebb-e0eef6be6a31",
  "displayName": "Developers-ba8cfcdb-b7fd-45d5-86ab-9888d0222f84",
  "_links": {
    "self": {
      "href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/Groups/vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTc2MDU2ODQ4LTMyODAwNzczODUtMjM4NDQzMDA4Mi0yNTc3Njk3NTA4LTEtMTgxNTc4MDU1Ny0xNjQxNDEyMTYyLTI2Mzk4Nzg1NzctMjA4NDYyNTczMg"
    },
    "memberships": {
      "href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/Memberships/vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTc2MDU2ODQ4LTMyODAwNzczODUtMjM4NDQzMDA4Mi0yNTc3Njk3NTA4LTEtMTgxNTc4MDU1Ny0xNjQxNDEyMTYyLTI2Mzk4Nzg1NzctMjA4NDYyNTczMg"
    },
    "membershipState": {
      "href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/MembershipStates/vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTc2MDU2ODQ4LTMyODAwNzczODUtMjM4NDQzMDA4Mi0yNTc3Njk3NTA4LTEtMTgxNTc4MDU1Ny0xNjQxNDEyMTYyLTI2Mzk4Nzg1NzctMjA4NDYyNTczMg"
    },
    "storageKey": {
      "href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/StorageKeys/vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTc2MDU2ODQ4LTMyODAwNzczODUtMjM4NDQzMDA4Mi0yNTc3Njk3NTA4LTEtMTgxNTc4MDU1Ny0xNjQxNDEyMTYyLTI2Mzk4Nzg1NzctMjA4NDYyNTczMg"
    }
  },
  "url": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/Groups/vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTc2MDU2ODQ4LTMyODAwNzczODUtMjM4NDQzMDA4Mi0yNTc3Njk3NTA4LTEtMTgxNTc4MDU1Ny0xNjQxNDEyMTYyLTI2Mzk4Nzg1NzctMjA4NDYyNTczMg",
  "descriptor": "vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTc2MDU2ODQ4LTMyODAwNzczODUtMjM4NDQzMDA4Mi0yNTc3Njk3NTA4LTEtMTgxNTc4MDU1Ny0xNjQxNDEyMTYyLTI2Mzk4Nzg1NzctMjA4NDYyNTczMg"
}

Definitions

Name Description
GraphGroup

Graph group entity

JsonPatchDocument

The JSON model for JSON Patch Operations

Operation

The patch operation

ReferenceLinks

The class to represent a collection of REST reference links.

GraphGroup

Graph group entity

Name Type Description
_links

ReferenceLinks

This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.

description

string

A short phrase to help human readers disambiguate groups with similar names

descriptor

string

The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.

displayName

string

This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.

domain

string

This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)

legacyDescriptor

string

[Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor.

mailAddress

string

The email address of record for a given graph member. This may be different than the principal name.

origin

string

The type of source provider for the origin identifier (ex:AD, AAD, MSA)

originId

string

The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.

principalName

string

This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.

subjectKind

string

This field identifies the type of the graph subject (ex: Group, Scope, User).

url

string

This url is the full route to the source resource of this graph subject.

JsonPatchDocument

The JSON model for JSON Patch Operations

Name Type Description
from

string

The path to copy from for the Move/Copy operation.

op

Operation

The patch operation

path

string

The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-).

value

object

The value for the operation. This is either a primitive or a JToken.

Operation

The patch operation

Name Type Description
add

string

copy

string

move

string

remove

string

replace

string

test

string

The class to represent a collection of REST reference links.

Name Type Description
links

object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.