Profiles - Get
Gets a user profile.
GET https://app.vssps.visualstudio.com/_apis/profile/profiles/{id}?api-version=7.1
GET https://app.vssps.visualstudio.com/_apis/profile/profiles/{id}?details={details}&withAttributes={withAttributes}&partition={partition}&coreAttributes={coreAttributes}&forceRefresh={forceRefresh}&api-version=7.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
id
|
path | True |
string |
The ID of the target user profile within the same organization, or 'me' to get the profile of the current authenticated user. |
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. |
core
|
query |
string |
A comma-delimited list of core profile attributes to return. Valid values are Email, Avatar, DisplayName, and ContactWithOffers. |
|
details
|
query |
boolean |
Return public profile information such as display name, email address, country, etc. If false, the withAttributes parameter is ignored. |
|
force
|
query |
boolean |
Not used in this version of the API. |
|
partition
|
query |
string |
The partition (named group) of attributes to return. |
|
with
|
query |
boolean |
If true, gets the attributes (named key-value pairs of arbitrary data) associated with the profile. The partition parameter must also have a value. |
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.profile | Grants the ability to read your profile, accounts, collections, projects, teams, and other top-level organizational artifacts. |
Examples
Sample request
GET https://app.vssps.visualstudio.com/_apis/profile/profiles/{id}?api-version=7.1
Sample response
{
"displayName": "Normal Paulk",
"publicAlias": "d6245f20-2af8-44f4-9451-8107cb2767db",
"emailAddress": "fabrikamfiber16@hotmail.com",
"coreRevision": 1647,
"timeStamp": "2014-05-12T22:23:07.727+00:00",
"id": "d6245f20-2af8-44f4-9451-8107cb2767db",
"revision": 1647
}
Definitions
Name | Description |
---|---|
Attribute |
Identifies an attribute with a name and a container. |
Attributes |
Stores a set of named profile attributes. |
Core |
A profile attribute which always has a value for each profile. |
Profile |
A user profile. |
Profile |
A named object associated with a profile. |
Profile |
The current state of the profile. |
AttributeDescriptor
Identifies an attribute with a name and a container.
Name | Type | Description |
---|---|---|
attributeName |
string |
The name of the attribute. |
containerName |
string |
The container the attribute resides in. |
AttributesContainer
Stores a set of named profile attributes.
Name | Type | Description |
---|---|---|
attributes |
<string,
Profile |
The attributes stored by the container. |
containerName |
string |
The name of the container. |
revision |
integer |
The maximum revision number of any attribute within the container. |
CoreProfileAttribute
A profile attribute which always has a value for each profile.
Name | Type | Description |
---|---|---|
descriptor |
The descriptor of the attribute. |
|
revision |
integer |
The revision number of the attribute. |
timeStamp |
string |
The time the attribute was last changed. |
value |
string |
The value of the attribute. |
Profile
A user profile.
Name | Type | Description |
---|---|---|
applicationContainer |
The attributes of this profile. |
|
coreAttributes |
<string,
Core |
The core attributes of this profile. |
coreRevision |
integer |
The maximum revision number of any attribute. |
id |
string |
The unique identifier of the profile. |
profileState |
The current state of the profile. |
|
revision |
integer |
The maximum revision number of any attribute. |
timeStamp |
string |
The time at which this profile was last changed. |
ProfileAttribute
A named object associated with a profile.
Name | Type | Description |
---|---|---|
descriptor |
The descriptor of the attribute. |
|
revision |
integer |
The revision number of the attribute. |
timeStamp |
string |
The time the attribute was last changed. |
value |
string |
The value of the attribute. |
ProfileState
The current state of the profile.
Name | Type | Description |
---|---|---|
custom |
string |
The profile is in use. |
customReadOnly |
string |
The profile is in use, but can only be read. |
readOnly |
string |
The profile may only be read. |