Get subscription

Retrieve the properties and relationships of a subscription.

Permissions

The following table lists the suggested permission needed for each resource. To learn more, including how to choose permissions, see Permissions.

Resource type / Item Permission
Contacts Contacts.Read
Conversations Group.Read.All
Events Calendars.Read
Messages Mail.Read
Drive (User's OneDrive) Files.ReadWrite
Drives (Sharepoint shared content and drives) Files.ReadWrite.All

HTTP request

GET /subscriptions/{subscriptionId}

Optional query parameters

This method supports the OData Query Parameters to help customize the response.

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

Do not supply a request body for this method.

Response

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

Example

Request

Here is an example of the request.

GET https://graph.microsoft.com/v1.0/subscriptions/{subscriptionId}
Response

Here is an example of the response.

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

{
  "id":"7f105c7d-2dc5-4530-97cd-4e7ae6534c07",
  "resource":"me/messages",
  "changeType":"created,updated",
  "clientState":"subscription-identifier",
  "notificationUrl":"https://webhook.azurewebsites.net/api/send/myNotifyClient",
  "expirationDateTime":"2016-11-20T18:23:45.9356913Z"
}