Study FAQ
How do I match a Power Platform custom connector's authentication to the API it calls?
Also asked as 2
- How should I set up a connector connection for an Azure Function or API Management endpoint?
- What authentication and data policy checks should I make before using a custom connector?
Answer
Configure authentication for the API boundary named in the custom connector definition. For an isolated Azure Function using function-level key authorization, configure an API key in the matching header or query location supported by the host and enter the test key when creating the connection. The Microsoft tutorial uses the query parameter code. Keep the credential out of the definition and sample URLs. A shared key proves possession of a credential, so use a supported user OAuth configuration when the API needs individual caller authorization.
If Azure API Management calls the Function, configure the connector for the gateway's own contract. Keep the backend Function key at the gateway if it supplies that key to the Function. For a supported OAuth configuration, register the generated redirect URI and match the API's scopes and authorization rules. The documented OpenAPI custom connector import does not support an OAuth client credentials security definition.
Check the environment and tenant policies for the connector and intended combinations with other data sources. Independently test the hosted API, then a permitted connection in the connector's Test page with good and revoked credentials. A successful localhost Function call does not demonstrate hosted key enforcement. Verify that invalid credentials cannot return protected data.
Microsoft references
Full explanation
AB-400: Custom Connectors with OpenAPI, Policies and Code
Study guide · AB-400
Read the full explanation