I downloaded the NodeJS code available at https://github.com/microsoftgraph/nodejs-apponlytoken-rest-sample and granted all permissions as required (Read and write calendars in all mailboxes and Read directory data application permissions in Microsoft Graph Application permissions).
I can successfully acquire all users that were added to Azure AD, but I'm not able to get any of their calendar information or create an event (which is the original code in the sample). All calls that I make return the following error:
'{\r\n "error": {\r\n "code": "UnknownError",\r\n "message": "",\r\n "innerError": {\r\n "request-id": "1fd8568b-b4a3-4168-a835-c389eb783890",\r\n "date": "2016-07-14T18:08:41"\r\n }\r\n }\r\n}' }
It may be important to note that my office 365 domain is not the same as the domain in the Azure AD account, although my office 365 administrator is the administrator of the Azure AD account. I don't know if that is the normal behavior and I should manually add my office 365 users to Azure AD with their Microsoft accounts (which I also created) or it may be the cause for this error.
My goal is to check if the users are free (no meeting in their calendars) in a specific period of time, which it seems to be possible according to Microsoft Graph API: can't list recurring events of a meeting room using the calendarView call.
I appreciate any help. Thanks.