Now that we are well acquainted with power apps and creating a microsoft graph custom connector in it, let us familiarize ourselves with the following terms once so that we can proceed to call Microsoft graph API in Power Automate using custome connectors for which we will require to set the criteria in authentication.
Azure API Management Gateway
Custom connectors are supported by Microsoft Azure API Management infrastructure. When a connection to the underlying API is created, the API Management gateway stores the API credentials or tokens, depending on the type of authentication used, on a per-connection basis in a token store. This solution enables authentication at the connection level.
Before using any connector in Azure Logic Apps, Power Automate, or Power Apps, the user needs to create a connection by authenticating to the network service. There are different types of authentication.
No authentication- No further information is required.
Basic authentication- The user will provide the user name and password to create the connection.
API Key- Used by web services. Make sure that you define- Parameter label, Parameter name, Parameter location
OAuth 2.0 authentication- Available for online connectors. Provides implementations for specific services and prebuilt identity provider templates, when selected, fill in many of the fields that are required by OAuth 2.0.
Windows authentication- Available only for connections that use on-premises data gateway, when the Connect via on-premises data gateway check box is set on the General tab. When a new connection is created, the user will need to provide Windows credentials for the service and then select one of the installed on-premises gateways.
Enter Last used for Summary and LastUsed for Operation ID. Go to the Request section and select + Import from sample.
Select Get for the verb, enter /me/insights/used for URL, and then select Import. Scroll down and select the default response.
Select + Import from sample. Paste the response that you copied from Graph Explorer in the Body field and then select Import.
Select Update connector. Don't navigate away from this page.
Step 6:Test the connector.
Select the Test tab and then select + New connection.
Provide your credentials. Read the requested permissions and continue.
Select Refresh connections and Test operation. You should see a 200 status, and the response should look like the image.
Congratulations!You have now created an environment to call Microsoft Graph API in Power Automate and can proceed to learn more in this area. Do leave your feedback in the comments below. Our next blog will on how toconnect Power BI to Microsoft Graph. Stay tuned!