none
How to check other user availability with Graph API? RRS feed

  • Question

  • I'm trying to implement checking availability for specific user (actually a room) in O365 calendar. I'm using Graph API as it's recommended by Microsoft.

    My first approach was using POST on https://graph.microsoft.com/v1.0/me/findMeetingTimes with the message body prepared according to template given in Graph API Explorer (https://developer.microsoft.com/en-us/graph/graph-explorer). On the API Explorer everything seems to work fine but when I try to run exactly the same request with my applications token I receive 403:

    {
      "error": {
        "code": "ErrorAccessDenied",
        "message": "Access is denied. Check credentials and try again.",
        "innerError": {
          "request-id": "b130177d-e138-4cc7-8e72-5d3529a9dc24",
          "date": "2017-03-21T08:47:10"
        }
      }
    }

    I checked the app's delegated permissions in AAD and they seem to be fine. For Microsoft Graph those are granted:

    * Calendars.ReadWrite.Shared
    * Calendars.Read.Shared
    * Calendars.ReadWrite
    * Calendars.Read

    I get exactly the same response (403) when I try to simply list user's events: https://graph.microsoft.com/v1.0/users/<user name>/events In Graph API Explorer 500 is returned.

    I found the following bug description: https://github.com/microsoftgraph/microsoft-graph-docs/issues/559 Is it related with the issues above?

    Any clue what I might be doing wrong?

    Is there any other way to achieve the same using different endpoint or API assuming that I still want to use oAuth for authorization?

    I will be grateful for any hint

    ---


    Update: Outlook Calendar API seems to work. Still appreciate any ideas why Graph API doesn't?


    Tuesday, March 21, 2017 9:43 AM

Answers

  • Hi,

    I've never heard of this error before. But I saw your entry on GitHub, which is the right channel for asking this question. In the mean time, I would suggest to use the Outlook REST API instead.


    Regards, Sjoukje

    Please remember to click 'Mark as Answer' on the post that helps you.

    Monday, March 27, 2017 8:12 AM
    Moderator

All replies

  • Anyone? Anything?
    Thursday, March 23, 2017 9:44 AM
  • Hi,

    I've never heard of this error before. But I saw your entry on GitHub, which is the right channel for asking this question. In the mean time, I would suggest to use the Outlook REST API instead.


    Regards, Sjoukje

    Please remember to click 'Mark as Answer' on the post that helps you.

    Monday, March 27, 2017 8:12 AM
    Moderator
  • Thank you, Sjoukje. Like I wrote in the update - Outlook REST API works well.

    Monday, April 3, 2017 6:02 AM
  • Hi,

    Great to hear! Did you get a response from GitHub? Want to share it?

    Thanks!


    Regards, Sjoukje

    Please remember to click 'Mark as Answer' on the post that helps you.

    Thursday, April 6, 2017 6:51 AM
    Moderator