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.
I need Outlook/Azure team? can you please explain that to me if it's not a bother
You need your Azure team to create a connected system on Azure, grant access to outlook features, create graph API for outlook , provide credentials and API tokens your appian team will use the tokens as a constant to be able to connect to API, create process models and other objects to use outlook data.
Thanks for the info.
Hi Steven,
Good day.
Could you please explain a bit on the below:
Getting the bearer token
https://login.microsoftonline.com/<INSERT_ORG_SPECIFIC_URL>/oauth2/v2.0/token
(INSERT_ORG_SPECIFIC_URL)
This is the Microsoft URL that supplies the token: https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code
I hope you are doing well.
I was able to generate the token but getting authorization issue when i try to access the API. Attached is the integration error i am getting. Thanks.
Check the permission given to the API in Azure Portal.
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!