I want my PowerApp to talk to one of our Web API endpoints on Azure that is set up for the OAuth "client credentials" grant flow. The security model for PowerApp connectors mandates that you let the PowerApp connector acquire the JWT token for you. This is a sensible architecture because it can force the call to the API to use the identity the user is logged in as. However, the "client credentials" flow uses a specific client id & client secret combination instead of the user's identity to generate the JWT token.
The only option to use in the Security tab of the Custom Connector appears to be "Generic Oauth 2". Unfortunately no combination of inputs has resulted in any change to the JWT token. It continues to present the a JWT token filled with information about the user's identity.
What do I need to do to get my Custom Connector to make a request to get the client credentials from "https://login/microsoftonline.com/{a-guid}" instead of using the identity credentials?
Here's a redacted image of my Security settings if it will help.
Currently, client credentials grant type is not supported by custom connectors.
https://learn.microsoft.com/en-us/connectors/custom-connectors/connection-parameters