'Moving from API Key to OAuth 2.0 as a Security option inside our Microsoft Power platform's custom connector.. how the authorization will be done

I am working on building a Power Automate custom connector that uses the OAuth 2.0 as the Security option .. now I am not sure how we can authorize the API calls in this case?

I mean if we use the API key as the Security option inside the custom connector, then we can authorize the request using the API key, which the user will enter when they want to use the custom connector inside their Power Automate flows.

But seems if we chose to use OAuth 2.0 as the security option when building the custom connector, then there is not any data that will be dynamically filled by the end users who will be using/consuming the custom connector inside their Power automate flows... so inside our system which expose the APIs, we can not identify the user who has performed the API call.. am i missing something? In other words; how the authorization will be done if we build a custom connector using the OAuth 2.0 as the security option, compared to API keys? In other words, when we use the API key as the security option >> then if the user want to use the custom connector >> they need to enter the API key. while if we use OAuth 2.0 as the security option >> then we are going to hard code the ClientID/ClientSecrete inside the custom connector itself, and the users who will be using this custom connector inside their Power automate flows will not enter any authorization data.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source