Posts

Showing posts from February, 2020

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 needed. In this case, I'm setting it to : "Never" This will generate the client se

How to parse JSON object and get variable values in Power Automate(flow) - Part 2

Image
This is the second part of my previous post. If you just visited this page, I highly recommend that you read the first part to get a clear understanding of how we pass field values from a canvas app to Power Automate flow via a JSON object .  Now that we are all caught up, let's begin.. As of now, we are able to get a JSON object such as below as the output of our flow:  [{"account":"jdoe123account","dob":"2/19/2020","email":"jdoe@mail.com","fname":"John","lname":"Doe"}] Now, our next step is to retrieve individual values from this object. For this, we need to update the  "Parse JSON" action in flow. Open the power app in design studio. Select the button and under "Action" tab, select "Power Automate" You will now see the flow(FormSubmitFlow) that we created last time.  Update "Parse JSON" ac

How to pass field values from a Canvas App to Power Automate(flow) - Part 1

Image
Let's see a simple example. I have a canvas app that has multiple input fields.  Once user submits the form, we need to send a confirmation email to the user with all submitted information. To do this, you need create a JSON object that contains all form values and pass it to Power Automate. Creating FormInfo Json Object First create a collection and add all inputs as string values. For Button1 OnSelect query, we need to first create this collection.  Collect(     FormInfo,     {         lname: lastname_input.Text,         fname: firstname_input.Text,         email: email_input.Text,         account: account_input.Text,         dob: Text(DatePicker1.SelectedDate)     } ); To further explain above step, I am creating five new variables (lname, fname, emil, account, dob) and assigning form input string values to them. After that, we need to convert this collection to a JSON object.