Show / Hide Table of Contents

    Contacts

    | Improve this Doc View Source

    get 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 In Type Default Notes
    *api-version query 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 Type Description Samples
    200

    OK. Indicates success. The results are returned in the response body.

    Mime type: application/json
    {
      "odata.metadata": "https://graph.windows.net/myorganization/$metadata#directoryObjects/Microsoft.DirectoryServices.Contact",
      "value": [
        {
            "odata.type": "Microsoft.DirectoryServices.Contact",
            "objectType": "Contact",
            "objectId": "31944231-fd52-4a7f-b32e-7902a01fddf9",
            "deletionTimestamp": null,
            "city": null,
            "companyName": null,
            "country": null,
            "department": null,
            "dirSyncEnabled": null,
            "displayName": "Marcus Breyer",
            "facsimileTelephoneNumber": null,
            "givenName": "Marcus",
            "jobTitle": null,
            "lastDirSyncTime": null,
            "mail": "Marcus@contoso.com",
            "mailNickname": "MarcusBreyer",
            "mobile": null,
            "physicalDeliveryOfficeName": null,
            "postalCode": null,
            "provisioningErrors": [],
            "proxyAddresses": [
              "SMTP:Marcus@contoso.com"
            ],
            "sipProxyAddress": null,
            "state": null,
            "streetAddress": null,
            "surname": "Breyer",
            "telephoneNumber": null
        },
        {
            "odata.type": "Microsoft.DirectoryServices.Contact",
            "objectType": "Contact",
            "objectId": "35110b16-360c-4c4a-93b2-03f065fabd93",
            "deletionTimestamp": null,
            "city": null,
            "companyName": null,
            "country": null,
            "department": null,
            "dirSyncEnabled": null,
            "displayName": "Yossi Ran",
            "facsimileTelephoneNumber": null,
            "givenName": "Yossi",
            "jobTitle": null,
            "lastDirSyncTime": null,
            "mail": "Yossi@contoso.com",
            "mailNickname": "YossiRan",
            "mobile": null,
            "physicalDeliveryOfficeName": null,
            "postalCode": null,
            "provisioningErrors": [],
            "proxyAddresses": [
              "SMTP:Yossi@contoso.com"
            ],
            "sipProxyAddress": null,
            "state": null,
            "streetAddress": null,
            "surname": "Ran",
            "telephoneNumber": null
        },
        {
            "odata.type": "Microsoft.DirectoryServices.Contact",
            "objectType": "Contact",
            "objectId": "7163f3b8-70c9-43d2-b9e1-4467ddaf087a",
            "deletionTimestamp": null,
            "city": null,
            "companyName": null,
            "country": null,
            "department": null,
            "dirSyncEnabled": null,
            "displayName": "Jeremy Nelson",
            "facsimileTelephoneNumber": null,
            "givenName": "Jeremy",
            "jobTitle": null,
            "lastDirSyncTime": null,
            "mail": "Jeremy@contoso.com",
            "mailNickname": "JeremyNelson",
            "mobile": null,
            "physicalDeliveryOfficeName": null,
            "postalCode": null,
            "provisioningErrors": [],
            "proxyAddresses": [
              "SMTP:Jeremy@contoso.com"
            ],
            "sipProxyAddress": null,
            "state": null,
            "streetAddress": null,
            "surname": "Nelson",
            "telephoneNumber": null
        },
        {
            "odata.type": "Microsoft.DirectoryServices.Contact",
            "objectType": "Contact",
            "objectId": "83234b5c-3a10-4108-8f36-39b1addadfdb",
            "deletionTimestamp": null,
            "city": null,
            "companyName": null,
            "country": null,
            "department": null,
            "dirSyncEnabled": null,
            "displayName": "David Strome",
            "facsimileTelephoneNumber": null,
            "givenName": "David",
            "jobTitle": null,
            "lastDirSyncTime": null,
            "mail": "David@contoso.com",
            "mailNickname": "DavidStrome",
            "mobile": null,
            "physicalDeliveryOfficeName": null,
            "postalCode": null,
            "provisioningErrors": [],
            "proxyAddresses": [
              "SMTP:David@contoso.com"
            ],
            "sipProxyAddress": null,
            "state": null,
            "streetAddress": null,
            "surname": "Strome",
            "telephoneNumber": null
        },
        {
            "odata.type": "Microsoft.DirectoryServices.Contact",
            "objectType": "Contact",
            "objectId": "8c1315ce-bf6f-4e26-b24f-c830606ef41c",
            "deletionTimestamp": null,
            "city": null,
            "companyName": null,
            "country": null,
            "department": null,
            "dirSyncEnabled": null,
            "displayName": "Holly Holt",
            "facsimileTelephoneNumber": null,
            "givenName": "Holly",
            "jobTitle": null,
            "lastDirSyncTime": null,
            "mail": "Holly@contoso.com",
            "mailNickname": "HollyHolt",
            "mobile": null,
            "physicalDeliveryOfficeName": null,
            "postalCode": null,
            "provisioningErrors": [],
            "proxyAddresses": [
              "SMTP:Holly@contoso.com"
            ],
            "sipProxyAddress": null,
            "state": null,
            "streetAddress": null,
            "surname": "Holt",
            "telephoneNumber": null
        }
      ]
    }
    | Improve this Doc View Source

    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 In Type Default Notes
    *object_id path 31944231-fd52-4a7f-b32e-7902a01fddf9

    The object ID (GUID) of the target contact.

    *api-version query 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 Type Description Samples
    200

    OK. Indicates success. The contact is returned in the response body.

    Mime type: application/json
    {
        "odata.metadata": "https://graph.windows.net/graphdir1.onmicrosoft.com/$metadata#directoryObjects/Microsoft.DirectoryServices.Contact/@Element",
        "odata.type": "Microsoft.DirectoryServices.Contact",
        "objectType": "Contact",
        "objectId": "31944231-fd52-4a7f-b32e-7902a01fddf9",
        "deletionTimestamp": null,
        "city": null,
        "companyName": null,
        "country": null,
        "department": null,
        "dirSyncEnabled": null,
        "displayName": "Marcus Breyer",
        "facsimileTelephoneNumber": null,
        "givenName": "Marcus",
        "jobTitle": null,
        "lastDirSyncTime": null,
        "mail": "Marcus@contoso.com",
        "mailNickname": "MarcusBreyer",
        "mobile": null,
        "physicalDeliveryOfficeName": null,
        "postalCode": null,
        "provisioningErrors": [],
        "proxyAddresses": [
          "SMTP:Marcus@contoso.com"
        ],
        "sipProxyAddress": null,
        "state": null,
        "streetAddress": null,
        "surname": "Breyer",
        "telephoneNumber": null
    }
    | Improve this Doc View Source

    update contact

    Change a contact's properties.

    Required scope: Contacts.Write

    Request
    PATCH /contacts/{object_id}?api-version
    Parameters
    Name In Type Default Notes
    *object_id path 7163f3b8-70c9-43d2-b9e1-4467ddaf087a

    The object ID (GUID) of the target contact.

    *api-version query 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 body contact

    this is request body, not real parameter

    Responses
    Status Code Type Description Samples
    204

    No Content. Indicates success. No response body is returned.

    | Improve this Doc View Source

    delete contact

    Delete a contact.

    Required scope: Contacts.Write

    Request
    DELETE /contacts/{object_id}[?api-version]
    Parameters
    Name In Type Default Notes
    *object_id path 7163f3b8-70c9-43d2-b9e1-4467ddaf087a

    The object ID (GUID) of the target contact.

    api-version query 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 Type Description Samples
    204

    No Content. Indicates success.

    | Improve this Doc View Source

    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 In Type Default Notes
    *object_id path 31944231-fd52-4a7f-b32e-7902a01fddf9

    The object ID (GUID) of the target contact.

    *api-version query 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 Type Description Samples
    200

    OK. Indicates success. A link to the contact's manager is returned.

    Mime type: application/json
    {
      "odata.metadata": "https://graph.windows.net/myorganization/$metadata#directoryObjects/$links/manager",
      "url": "https://graph.windows.net/myorganization/directoryObjects/35110b16-360c-4c4a-93b2-03f065fabd93/Microsoft.WindowsAzure.ActiveDirectory.Contact"
    }
    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
    {
      "odata.error": {
        "code": "Request_ResourceNotFound",
        "message": {
          "lang": "en",
          "value": "Resource not found for the segment 'manager'."
        }
      }
    }
    | Improve this Doc View Source

    update contact manager

    Update the contact's manager

    Required scope: Contacts.Write

    Request
    PUT /contacts/{object_id}/$links/manager?api-version
    Parameters
    Name In Type Default Notes
    *object_id path 31944231-fd52-4a7f-b32e-7902a01fddf9

    The object ID (GUID) of the target contact.

    *api-version query 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 body

    The request body contains a single property that specifies the URL of the user or contact to add as manager.

    Responses
    Status Code Type Description Samples
    204

    No Content. Indicates success. No response body is returned.

    | Improve this Doc View Source

    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 In Type Default Notes
    *object_id path 31944231-fd52-4a7f-b32e-7902a01fddf9

    The object ID (GUID) of the target contact.

    *api-version query 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 Type Description Samples
    204

    No Content. Indicates success. N response body is returned.

    | Improve this Doc View Source

    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 In Type Default Notes
    *object_id path 31944231-fd52-4a7f-b32e-7902a01fddf9

    The object ID (GUID) of the target contact.

    *api-version query 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 Type Description Samples
    200

    OK. Indicates success. One or more direct reports are returned.

    Mime type: application/json
    {
      "odata.metadata": "https://graph.windows.net/myorganization/$metadata#directoryObjects/$links/directReports",
      "value": [
        {
          "url": "https://graph.windows.net/myorganization/directoryObjects/8c1315ce-bf6f-4e26-b24f-c830606ef41c/Microsoft.DirectoryServices.Contact"
        }
      ]
    }
    | Improve this Doc View Source

    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 In Type Default Notes
    *object_id path 31944231-fd52-4a7f-b32e-7902a01fddf9

    The object ID (GUID) of the target contact.

    *api-version query 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 Type Description Samples
    200

    OK. Indicates success. One or more groups and/or directory roles are returned.

    Mime type: application/json
    {
      "odata.metadata": "https://graph.windows.net/myorganization/$metadata#directoryObjects/$links/memberOf",
      "value": [
        {
          "url": "https://graph.windows.net/myorganization/directoryObjects/12345678-b942-47c9-a10e-a4bee353ce60/Microsoft.DirectoryServices.Group"
        }
      ]
    }

    Definitions

    contact

    Name Type Notes
    objectType string
    objectId string
    deletionTimestamp string (date-time)
    city string
    country string
    department string
    dirSyncEnabled boolean
    displayName string
    facsimileTelephoneNumber string
    givenName string
    jobTitle string
    lastDirSyncTime string (date-time)
    mail string
    mailNickname string
    mobile string
    physicalDeliveryOfficeName string
    postalCode string
    provisioningErrors ProvisioningError[]
    proxyAddresses array
    sipProxyAddress string
    state string
    streetAddress string
    surname string
    telephoneNumber string
    thumbnailPhoto string

    ProvisioningError

    Name Type Notes
    errorDetail string
    resolved boolean
    serviceInstance string
    timestamp string (date-time)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX