web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : envvS8Et3AfM7YqTWklnLJ
Power Automate - Connector Development
Answered

Possible to Change a Custom Connector's API key at runtime?

Like (0) ShareShare
ReportReport
Posted on 16 Jan 2023 20:57:48 by 9

Hi

 

I have a Power App that needs to fetch data from a 3rd party.  Before I can run most of my queries, I need to first get a token from the API provider by passing in a username and a fixed token.  This gives me back a token, good for fixed amount of time.  Trying to work out how to accomplish this with a canvas app, I've done the following:

 

  • Create a custom  connector that uses no security.  This gives me back a token from the 3rd party API provider
  • Created a second custom connector that uses API key for security

When my canvas app first starts, I'm run my first connector, getting my token back.  Now I need to pass that token to my second connector for additional queries.  I can do this manually when designing the app, but can't ask the user to make same changes.

 

So, is it possible to change the API key used in the second connector at runtime?  If so, how?

 

Tks

 

I have the same question (0)
  • Verified answer
    Radar4 Profile Picture
    9 on 19 Jan 2023 at 16:44:09
    Re: Possible to Change a Custom Connector's API key at runtime?

    This is very helpful.  Thanks for that.

  • SameerCh Profile Picture
    on 18 Jan 2023 at 19:57:02
    Re: Possible to Change a Custom Connector's API key at runtime?

    You should check out policies (What is policy and where is it used? | Microsoft Learn).

     

    There are 2 ways to send user data to a connector:

    (1) As connection parameters. This is information that is associated with a user's connection. Things like username/password, token, etc.

    (2) As operation parameters. This is data sent when you use a connector's action in an app or a flow.

     

    In your case, since the data is not associated with a connection, you will use operation parameter. So, you can define a custom header and send it to the connector. Your connector can then read the data from the header and use the Set Header Policy to stamp the right Authentication header in the outgoing request.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Featured topics

Loading complete