Online Docs

Set User Mapping

Update the mapping of a user account.

1
2
3
4
5
POST odata/_userMappings
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]
--data-binary [UserObject] |

URL Endpoint

odata/_userMappings

Method

POST.

Parameters

Do not supply OData Filter syntax.

Request Header

1
2
3
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]

Body

This endpoint needs the following information:

1
2
3
4
5
6
7
8
9
10
11
{
"user365": "[UserO365]",
"source": "[SourceCode]",
"username": "[UserName]",
"localId": "5e61bd889e653912e84c1aa8",
"displayName": "Oliver Neal",
"sourceId": "oliver@anadea.com",
"email": "oliver@anadea.com",
"projectHostname": "[HostName]",
"projectId": "[SourceID]"
}

Example

1
2
3
4
5
6
7
8
9
10
11
{
"user365": "oliver@anadea.com",
"source": "Microsoft.Vsts",
"username": "oliver@anadea.com",
"localId": "5e61bd889e653912e84c1aa8",
"displayName": "Oliver Neal",
"sourceId": "oliver@anadea.com",
"email": "oliver@anadea.com",
"projectHostname": "https://anadea.visualstudio.com",
"projectId": "5bda7c8743137b5e4d31d531"
}

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

{
"@odata.context": "https://schema.appvity.com/odata/$metadata#_userMappings/$entity",
"@odata.editLink": "https://schema.appvity.com/odata/_userMappings('5f69a4314d596392f570e8d6')",
"@odata.id": "https://schema.appvity.com/odata/_userMappings('5f69a4314d596392f570e8d6')",
"user365": "oliver@anadea.com",
"source": "Microsoft.Vsts",
"username": "oliver@anadea.com",
"localId": "5e61bd889e653912e84c1aa8",
"displayName": "Oliver Neal",
"sourceId": "oliver@anadea.com",
"email": "oliver@anadea.com",
"projectHostname": "https://anadea.visualstudio.com",
"tenantId": "df7abg9c-c05a-4fc9-b958-64faered911d",
"createdAt": "2020-09-22T07:13:53.307Z",
"updatedAt": "2020-09-22T07:13:53.307Z",
"_id": "5f69a4314d596392f570e8d6"
}

Error

Code : 400 Bad Request

Message

{

“code”: “User mapping already exist.”,

“message”: “User mapping already exist.”

}

Comment

Was this article helpful?
Thanks For Your Feedback