3
votes

Using the following url: https://graph.microsoft.com/dd0d2506-56b4-463c-bd19-98cd81bdfb1c/users/821d91b8-36e1-4b89-bd3a-4caecc40e4c9/$links/memberOf?api-version=1.6

I am trying to call the graph API and I am getting the following error.

{
  "error": {
    "code": "BadRequest",
    "message": "Invalid version",
    "innerError": {
      "request-id": "cb8002f1-da39-4ad2-8695-a2d349efc303",
      "date": "2016-10-12T10:46:23"
    }
  }
}

I have tried these versions

  • /users?api-version=1.5
  • /users?api-version=beta
  • /users?api-version=1.6

The azure portal is in "preview". Anyone seen this?

1
Since you are not providing what request you are actually making, have you seen this: msdn.microsoft.com/library/azure/ad/graph/api/… - 4c74356b41

1 Answers

13
votes

The API version pattern you're using is for the Azure AD Graph API (https://graph.windows.net), but the endpoint you are using is for Microsoft Graph API (https://graph.microsoft.com).

If you want to use Azure AD Graph API, you should use:

https://graph.windows.net/{tenant-id}/users/{id}/memberOf?api-version=1.6

If you want to use Microsoft Graph API, you would use:

https://graph.microsoft.com/v1.0/{tenant-id}/users/{id}/memberOf