Memberships - Get

Get a membership relationship between a container and subject.

GET https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}?api-version=5.0-preview.1

URI Parameters

Name In Required Type Description
containerDescriptor
path True

string

A descriptor to the container in the relationship.

organization
path True

string

The name of the Azure DevOps organization.

subjectDescriptor
path True

string

A descriptor to the child subject in the relationship.

api-version
query True

string

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

Responses

Name Type Description
200 OK

GraphMembership

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 Grants the ability to read user, group, scope and group membership information

Examples

For a Group
For a User

For a Group

Sample Request

GET https://vssps.dev.azure.com/fabrikam/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}?api-version=5.0-preview.1

Sample Response

{
  "containerDescriptor": "TWljcm9zb2Z0LlRlYW1Gb3VuZGF0aW9uLklkZW50aXR5O1MtMS05LTE1NTEzNzQyNDUtNDI4NzE1MDg5LTI0ODk3NTM0MTMtMjc5MTIyNzA3NS0yNDUyNDc1MzktMS0xMzQwMjAwMjExLTcxMDc4MDQ5My0yMjcxMTQ2Njk2LTE5NTEzNjAxNDc",
  "memberDescriptor": "TWljcm9zb2Z0LlRlYW1Gb3VuZGF0aW9uLklkZW50aXR5O1MtMS05LTE1NTEzNzQyNDUtNDI4NzE1MDg5LTI0ODk3NTM0MTMtMjc5MTIyNzA3NS0yNDUyNDc1MzktMS0zNzExMDMzOTI5LTMyMDM5ODY3NjItMzA0NzMyMzAwOS0zNzQ1OTQ0MTQy"
}

For a User

Sample Request

GET https://vssps.dev.azure.com/fabrikam/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}?api-version=5.0-preview.1

Sample Response

{
  "containerDescriptor": "TWljcm9zb2Z0LlRlYW1Gb3VuZGF0aW9uLklkZW50aXR5O1MtMS05LTE1NTEzNzQyNDUtNDI4NzE1MDg5LTI0ODk3NTM0MTMtMjc5MTIyNzA3NS0yNDUyNDc1MzktMS00MjcxMTAxODY2LTM1OTc5OTg5MTQtMjUxNDgwMzY2Mi04Njk2MTUyNTY",
  "memberDescriptor": "TWljcm9zb2Z0LklkZW50aXR5TW9kZWwuQ2xhaW1zLkNsYWltc0lkZW50aXR5OzQ1YWEzZDJkLTc0NDItNDczZC1iNGQzLTNjNjcwZGE5ZGQ5NlxqdHNlbmdAdnNjc2kudXM"
}

Definitions

Name Description
GraphMembership

Relationship between a container and a member

ReferenceLinks

The class to represent a collection of REST reference links.

GraphMembership

Relationship between a container and a member

Name Type Description
_links

ReferenceLinks

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

containerDescriptor

string

memberDescriptor

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.