Posts

Showing posts with the label Graph

Authenticate Graph API Using Power Automate - Part 2

Image
In my previous post, we created an application in azure active directory and gave Graph API access to this application. If you are not familiar with this area, I highly recommend that you read - How to set up application access to graph API in azure AD , Now that we have set up application access in azure AD, we can now use this application to authenticate Graph API via power automate. Like all my flows, we can break this down to two stages: 1. Access token request 2. Parse response and retrieve the bearer token Access token request(Flow) Here are the Steps: Create a new flow (Instant from blank) Add 3 inputs to the flow trigger: 1. Organization/tenant ID : Text Input 2. AppID/Client ID: Text Input 3. Client Secret: Text Input Now, let's create the "HTTP  Request" flow action: Here are the parameters Method : POST URI : https://login.microsoftonline.com/{Add Organization}/oauth2/token Content-Type : application/x-www-form-urlencoded Body :...

Authenticate Graph API Using Power Automate - Part 1 (Configure application access in azure active directory)

Image
In order to use Graph API, we need to first set up authentication. Graph API only supports below methods of authentication: Permission type                                         Permissions (from least to most privileged) Delegated (work or school account)           Group.ReadWrite.All Graph API authentication is enabled through Azure Active Directory. Here are the steps: 1. Go to :  https://portal.azure.com/ 2. Click " App Registrations" > "New Registration" 3. Give a name to the new app, select the relevant account type and click "Register" Once the app is provisioned, you will be able to see the App ID, TenantID, ObjectID and other specific fields for the Azure App. Now we need to create a client secret for this app. Click on "Certificates and secrets". Enter the name for your client secret and set expiration as n...