I'm trying to set up the following workflow:
I've been able to get the first part working. I have a developer portal set up, and from the portal I'm able to access the 3rd-party API. When attempting to access it, the portal prompts me for what type of authentication, and when I select "authorization code" (which is the one I configured), it correctly opens a prompt and asks me to authorize the connection, after which it provides me back the data as expected.
I'm unable to get the second part working, though. Using Azure API Management, I created a custom connector in Power Automate. When I went into the connectors in Power Automate to review the newly-created connector, I noticed that the authentication type it selected was API Key. When creating a connection using that connector, I was prompted with the same prompt as I described earlier. After providing authorization and then attempting to use the connector in a flow, I get the error "invalid token".
I have a feeling the reason why this is happening is because it's attempting to use the token that was generated when I initially authorized the connection, rather than requesting a new token when making the request. But I'm unsure of how to actually make that happen. I'd considered switching from API Key to OAuth2, but I can't find any documentation anywhere that explains how to use OAuth2 to authenticate through Azure API Management. The only documentation I can find refers to creating the connector in Power Automate using the OAuth2 credentials defined in the 3rd-party application - but that seems to completely skip over the first objective.
Any help or information is appreciated. Thanks!
Okay - so after some research, the conclusion is, using Authorizations solves pretty much all of the problems I was facing. Neato.