Contacts
| Improve this Doc View Sourceget contacts
You can get a collection of contacts from your tenant.
Required scope: Contacts.Read or Contacts.Write
Request
GET /contacts?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*api-version | string | 1.6 | The version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
Responses
Status Code | Description | Samples |
---|---|---|
200 | OK. Indicates success. The results are returned in the response body. |
Mime type: application/json
|
get contact by id
Get a contact by using the object ID.
Required scope: Contacts.Read or Contacts.Write
Request
GET /contacts/{object_id}?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 31944231-fd52-4a7f-b32e-7902a01fddf9 | The object ID (GUID) of the target contact. |
*api-version | string | 1.6 | Specifies the version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
Responses
Status Code | Description | Samples |
---|---|---|
200 | OK. Indicates success. The contact is returned in the response body. |
Mime type: application/json
|
update contact
Change a contact's properties.
Required scope: Contacts.Write
Request
PATCH /contacts/{object_id}?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 7163f3b8-70c9-43d2-b9e1-4467ddaf087a | The object ID (GUID) of the target contact. |
*api-version | string | 1.6 | The version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
bodyparam | this is request body, not real parameter |
Responses
Status Code | Description | Samples |
---|---|---|
204 | No Content. Indicates success. No response body is returned. |
delete contact
Delete a contact.
Required scope: Contacts.Write
Request
DELETE /contacts/{object_id}[?api-version]
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 7163f3b8-70c9-43d2-b9e1-4467ddaf087a | The object ID (GUID) of the target contact. |
api-version | string | 1.6 | Specifies the version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
Responses
Status Code | Description | Samples |
---|---|---|
204 | No Content. Indicates success. |
get contact manager link
Get a link to the contact's manager.
Required scope: Contacts.Read or Contacts.Write
Request
GET /contacts/{object_id}/$links/manager?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 31944231-fd52-4a7f-b32e-7902a01fddf9 | The object ID (GUID) of the target contact. |
*api-version | string | 1.6 | The version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
Responses
Status Code | Description | Samples |
---|---|---|
200 | OK. Indicates success. A link to the contact's manager is returned. |
Mime type: application/json
|
404 | Not Found. The requested resource was not found. This can occur if the manager property is not currently set for the specified contact. It can also have other causes, for example, a bad domain. A code and associated message is returned with the error. |
Mime type: application/json
|
update contact manager
Update the contact's manager
Required scope: Contacts.Write
Request
PUT /contacts/{object_id}/$links/manager?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 31944231-fd52-4a7f-b32e-7902a01fddf9 | The object ID (GUID) of the target contact. |
*api-version | string | 1.6 | The version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
*bodyparam | The request body contains a single property that specifies the URL of the user or contact to add as manager. |
Responses
Status Code | Description | Samples |
---|---|---|
204 | No Content. Indicates success. No response body is returned. |
delete contact manager by id
Delete the contact's manager.
Required scope: Contacts.Write
Request
DELETE /contacts/{object_id}/$links/manager?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 31944231-fd52-4a7f-b32e-7902a01fddf9 | The object ID (GUID) of the target contact. |
*api-version | string | 1.6 | The version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
Responses
Status Code | Description | Samples |
---|---|---|
204 | No Content. Indicates success. N response body is returned. |
get contact direct reports links
Get a links to the contact's direct reports.
Required scope: Contacts.Read or Contacts.Write
Request
GET /contacts/{object_id}/$links/directReports?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 31944231-fd52-4a7f-b32e-7902a01fddf9 | The object ID (GUID) of the target contact. |
*api-version | string | 1.6 | The version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
Responses
Status Code | Description | Samples |
---|---|---|
200 | OK. Indicates success. One or more direct reports are returned. |
Mime type: application/json
|
get contact memberOf links
Get a links to the contact's direct group and directory role memberships.
Required scope: Contacts.Read or Contacts.Write
Request
GET /contacts/{object_id}/$links/memberOf?api-version
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*object_id | string | 31944231-fd52-4a7f-b32e-7902a01fddf9 | The object ID (GUID) of the target contact. |
*api-version | string | 1.6 | The version of the Graph API to target. Beginning with version 1.5, the api-version string is represented in major.minor format. Prior releases were represented as date strings: '2013-11-08' and '2013-04-05'. Required. |
Responses
Status Code | Description | Samples |
---|---|---|
200 | OK. Indicates success. One or more groups and/or directory roles are returned. |
Mime type: application/json
|