Skip to content

Latest commit

 

History

History
199 lines (172 loc) · 7.34 KB

File metadata and controls

199 lines (172 loc) · 7.34 KB
title Get contact
description Retrieve the properties and relationships of a contact object.
author kevinbellinger
ms.localizationpriority medium
ms.subservice outlook
doc_type apiPageType
ms.date 02/27/2026

Get contact

Namespace: microsoft.graph

Retrieve the properties and relationships of a contact object.

There are two scenarios where an app can get a contact in another user's contact folder:

  • If the app has application permissions, or,
  • If the app has the appropriate delegated permissions from one user, and another user has shared a contact folder with that user, or, has given delegated access to that user. See details and an example.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

A contact in the user's mailbox.

GET /me/contacts/{id}
GET /users/{id | userPrincipalName}/contacts/{id}

A contact from a user's top level contactFolder.

GET /me/contactfolders/{Id}/contacts/{id}
GET /users/{id | userPrincipalName}/contactfolders/{id}/contacts/{id}

A contact contained in a child folder of a contactFolder. The example below shows one level of nesting, but a contact can be located in a child of a child and so on.

GET /me/contactFolders/{id}/childFolders/{id}/.../contacts/{id}
GET /users/{id | userPrincipalName}/contactFolders/{id}/childFolders/{id}/contacts/{id}

Optional query parameters

Name Value Description
$expand string Comma-separated list of relationships to expand and include in the response. See the relationships table of the contact object for supported names.
$select string Comma-separated list of properties to include in the response.

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a contact object in the response body.

Example

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/me/contacts/AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEOAAAiIsqMbYjsT5e-T7KzowPTAAAYbuK-AAA=

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('48d31887-5fad-4d73-a9f5-3c356e68a038')/contacts/$entity",
    "@odata.etag": "W/\"EQAAABYAAAAiIsqMbYjsT5e/T7KzowPTAAAYc8Bf\"",
    "id": "AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEOAAAiIsqMbYjsT5e-T7KzowPTAAAYbuK-AAA=",
    "createdDateTime": "2017-09-04T15:54:01Z",
    "lastModifiedDateTime": "2017-09-04T15:54:02Z",
    "changeKey": "EQAAABYAAAAiIsqMbYjsT5e/T7KzowPTAAAYc8Bf",
    "categories": [],
    "parentFolderId": "AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OAAuAAAAAAAiQ8W967B7TKBjgx9rVEURAQAiIsqMbYjsT5e-T7KzowPTAAAAAAEOAAA=",
    "birthday": null,
    "fileAs": "",
    "displayName": "Alex Wilber",
    "givenName": "Alex",
    "initials": null,
    "middleName": null,
    "nickName": null,
    "surname": "Wilber",
    "title": null,
    "yomiGivenName": null,
    "yomiSurname": null,
    "yomiCompanyName": null,
    "generation": null,
    "emailAddresses": [
      {
        "name": "Alex Wilber",
        "address": "alexw@contoso.com",
        "type": "unknown"
      },
      {
        "name": "Alex Wilber",
        "address": "alex.wilber@outlook.com",
        "type": "personal"
      }
    ],
    "primaryEmailAddress": {
      "name": "Alex Wilber",
      "address": "alexw@contoso.com"
    },
    "secondaryEmailAddress": {
      "name": "Alex Wilber",
      "address": "alex.wilber@outlook.com"
    },
    "tertiaryEmailAddress": null,
    "imAddresses": [
      "sip:alexw@contoso.com"
    ],
    "jobTitle": "Web Marketing Manager",
    "companyName": null,
    "department": null,
    "officeLocation": null,
    "profession": null,
    "businessHomePage": null,
    "assistantName": null,
    "manager": null,
    "homePhones": [],
    "mobilePhone": null,
    "businessPhones": [],
    "spouseName": null,
    "personalNotes": "",
    "children": [],
    "homeAddress": {},
    "businessAddress": {},
    "otherAddress": {}
}