I am using connected system with Oauth2.0 to connect to office365 and get the calendars i m able to authorize using connected system however when testing the base url I get the below error
Invalid credentials
Appian was not able to authenticate with the access token you provided. This request requires Bearer authentication. HTTP/1.1 401 Unauthorized Next Steps
When i run the authorization its executes successfully. Has any one seen this issue before or can someone share the Oauth2.0 configuration related to outlook ( For outlook defining a scope is mandatory)
Discussion posts and replies are publicly visible
Is it difficult to integrate outlook in appian?
It depends, you need appian and Outlook/Azure team to collaborate to integrate it.
Agreed, the required permissions are listed here:
https://docs.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http#permissions
There is another error message that says " Authorization Request denied, insufficient privileges to perform the operation"
Here is the configured permission in Azure AD.
What type of connection mechanism are you using to connect to graph API, is it client credentials grant type or authorization code grant flow? I have it working as a client credentials grant type based on the inputs received from Steven Miccile check the post above for steps. If you are using client credential grant type then you need 2 integration objects one will get the token using POST method and store it in a constant and second will perform a GET request and use the stored token to get data from Azure connected system.
I'm using the 1st approach. I've followed the above steps to generate the token using POST method and also i was able to successfully ping "https://graph.microsoft.com/v1.0".
I'm getting the error when i try to access my user profile or my calendar such as like below.
https://graph.microsoft.com/v1.0/users/<my-email>/calendarview?startdatetime=<start time>&enddatetime=<end time>
Try this
https://graph.microsoft.com/v1.0/users/email@address/calendarview?startDateTime=2020-06-30T03:00:00&endDateTime=2022-11-08T17:00:00&$select=Subject,Start,ENd,Location&$top=1048
Don't try to pull in too much of data it does error out if calendars of more than 2.5 years are requested.
Based on this screenshot, your Azure setup is for "Delegated" permissions which is on behalf of the logged in user you would need an OAuth Authorization Code connected system in Appian (NOT client credentials). Even so, the permissions are not enough since the /users API requires a minimum of User.ReadBasic.All which has not been granted based on the picture.
If you want to use OAuth Client Credentials grant type for a service account type integration, the Azure permissions must be "Application" and not "Delegated".
Steven Miccile Thank you for your help. Per your instruction I've changed the Azure permissions from "Delegated" to "Application" and i was able to access the graph API. Thank you.
Awesome!
Hi Steven Miccile, Ankur VI'm trying to integrate outlook calendar with Appian and followed the above steps with 2 integration objects. I'm able to retrieve the token using first Integration object, but when i invoke the second integration object with the token I'm getting below error. I had stored the Bearer token in ri and passing the same in header.
Permissions defined in Azure portal.
You can always throw the token into https://jwt.io/ to see if it actually has the permissions you think it does.