0% found this document useful (0 votes)
2 views2 pages

Power Automate Flow For OIC REST API

This document outlines the steps to create a Power Automate flow that integrates with the OIC REST API using client credentials. It details the creation of a flow triggered by Power Apps, the process of fetching an access token via an HTTP action, and making a dynamic HTTP call to the OIC endpoint. Finally, it describes how to return the response back to Power Apps, including mapping the response body and status code.

Uploaded by

fauna.sweat113
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Power Automate Flow For OIC REST API

This document outlines the steps to create a Power Automate flow that integrates with the OIC REST API using client credentials. It details the creation of a flow triggered by Power Apps, the process of fetching an access token via an HTTP action, and making a dynamic HTTP call to the OIC endpoint. Finally, it describes how to return the response back to Power Apps, including mapping the response body and status code.

Uploaded by

fauna.sweat113
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Power Automate Flow for OIC REST API (Client Credentials)

1. Create a new flow


 In Power Automate, start with a Power Apps trigger (so the flow can be
called directly from your app).
 This trigger allows you to pass parameters (like endpoint path, method,
body) from Power Apps.
2. Add an HTTP action to fetch the token
 Action: HTTP
 Method: POST
 URI: [Link]
[Link]/oauth2/
v1/token
[Link]
 Headers:
Content-Type: application/x-www-form-urlencoded
 Body:
grant_type=client_credentials
client_id=<CLIENT_ID>
client_secret=<CLIENT_SECRET>
scope=<OIC_SCOPE>
 Parse the JSON response with a Parse JSON action to extract
access_token.
3. Add an HTTP action to call OIC
 Action: HTTP
 Method: dynamic (GET, POST, PUT, DELETE) — pass from Power Apps.
 URI:
[Link]
[Link]/ic/api/integration/v1/flows/rest/
CFS_MS_ENTRA_ABS_DURATI/1.0/triggeroic
 Headers:
Authorization: Bearer @{body('Parse_JSON')?['access_token']} Content-Type:
application/json
 Body: pass from Power Apps if needed (for POST/PUT).
4. Return the response to Power Apps
 Add a Respond to Power Apps action.
 Map the OIC response body (and status code if useful) back to Power Apps.

You might also like