AnsweredAssumed Answered

Question: Microsoft Graph API / Access Office 365 Calendar with /adminconsent

Question asked by 37452659 on Jul 3, 2018
Latest reply on Jul 9, 2018 by 37452659

Dear Community,

I setup a HTTP Client Connector to read/write Calendar Data to MS Azure.

The goal is to read TimeOff data from SuccessFactors and write them in the Outlook Calendar.

 

For most of the Setup I refer to Rene Klomp Blog Post (-> *1).
With the Connector I'm able to read/write my Appointments and also able to read/write Appointments from Accounts which assign me access to their Calendar. That works great, thank you Rene.

 

But unfortuantely I'm not able to read/write Calendar from the other Accounts.
I had a discussion with an Azure Consultant, he told me, that I have to use /adminconsent (-> *1).

 

 

But how can I add the /adminconsent to my Boomi HTTP Connector Setup?

When generating the OAuth Access Token a wrong Request is send to Microsoft Azure Portal.

 

According to MS Documentation, the request should look like this:
https://login.microsoftonline.com/common/adminconsent
?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
&state=12345
&redirect_uri=http://localhost/myapp/permissions

 

But Boomi send following:
https://login.microsoftonline.com/common/oauth2/authorize
?scope=Calendars.Read+Calendars.Read.Shared+Calendars.ReadWrite+Calendars.ReadWrite.Shared&response_type=code
&redirect_uri=https%3A%2F%2Fplatform.boomi.com%2Faccount%2Fpentosageuro-ABCDEF%2Foauth2%2Fcallback
&resource=https%3A%2F%2Fgraph.microsoft.com
&state=oauth2gen-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

 

 

 

The Connector is working well for me or Accounts who assign permissions to me.

It is not an issue of the HTTP Client Operation, request is well formatted:

https://graph.microsoft.com/v1.0/users/christian.weber@pentos.com/calendarview?startdatetime=2018-06-29T12:49:29.019Z&en… 

 

and response from Azure is:

 

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('christian.weber%40pentos.com')/calendarView",
  "@odata.nextLink": "https://graph.microsoft.com/v1.0/users/christian.weber@pentos.com/calendarview?startdatetime=2018-06-29T13%3a00%3a50.035Z&enddatetime=2018-07-16T13%3a00%3a50.035Z&$skip=10//graph.microsoft.com/v1.0/users/christian.weber@pentos.com/calendarview?startdatetime=2018-06-29T13%3a00%3a50.035Z&enddatetime=2018-07-16T13%3a00%3a50.035Z&$skip=10",
  "value": [
   "..... RESULT ...."
  ]
}

 

 

When I access Accounts without permission, result is:

 

{
  "error": {
    "code": "ErrorItemNotFound",
    "message": "The specified object was not found in the store.",
    "innerError": {
      "request-id": "c18a0c6f-77f2-4d93-a214-6922997586ed",
      "date": "2018-07-02T13:04:55"
    }
  }
}

 

 

 

*1

https://community.boomi.com/community/knowledge-center/blog/2017/01/24/integrating-with-the-microsoft-graph-api

 

*2

Get access without a user - Documentation - Microsoft Graph 

Outcomes