Posts

Showing posts from March, 2020

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 :

How to copy a plan in a group only using power automate

Image
One of the issues with Graph API access is the security.  Since some actions require Group read/write/all access, it may be hard to get admin consent for Graph API due to security standards of your organization. Below is a simple workaround that we can use to copy a plan only using SharePoint and planner connectors in Power Automate(flow). First, let's look at the limitations of this flow: Flow(Power Automate) planner connectors do not have label related actions therefore, we cannot copy labels using flow Flow planner connector cannot create plans therefore, we need to first create an empty plan and get the Group ID and Plan ID Flow connector doesn't create checklist items. To be clear, this automation will not copy labels or checklist items in the plan. Like all my automatons, I will break this down to a few stages and explain: 1. Create a planner template as a list in SharePoint. 2. Copy the template to new planner and create tasks 3. Assign