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.