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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom connector: gene...
Power Automate
Unanswered

Custom connector: generic oauth audience

(0) ShareShare
ReportReport
Posted on by 29

Hello!

 

We are creating a custom connector to package our public APIs and are setting this up with Auth0 and are using the generic oauth option in our connector.

 

We would need to specify the target audience when new connections are created for the connector. I have not been able to find a way to specify this. Not in power automate's browser UI nor via the paconn CLI tool to update the connector properties directly.

 

Are we overlooking this configuration setting somewhere or is it not possible to specify the audience when we request a token?

Thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    IndraDeMesmaeke Profile Picture
    29 on at

    We managed to solve this by checking out other open sourced certified connectors.

     

    Using paconn we download the apiProperties.json

    The identityProvider was set to oauth2, when it should have been oauth2generic (which is what we have selected in the UI).

     

    Then under the custom parameters we now have access to templating options for the authorization calls:

    "customParameters": {
    "authorizationUrlTemplate": {
    "value": "https://mydomain.com/authorize"
    },
    "authorizationUrlQueryStringTemplate": {
    "value": "?audience=https://mydomain.com&scope={scopes}&redirect_uri={redirectUrl}&client_id={ClientId}&response_type=code&state={State}"
    },
    "tokenUrlTemplate": {
    "value": "https:///mydomain.com/oauth/token"
    },
    "tokenBodyTemplate": {
    "value": "audience=https://mydomain.com&scope={scopes}&redirect_uri={redirectUrl}&client_id={ClientId}&client_secret={ClientSecret}&code={Code}&grant_type=authorization_code"
    },
    "refreshUrlTemplate": {
    "value": "https://mydomain.com/oauth/token"
    },
    "refreshBodyTemplate": {
    "value": "audience=https://mydomain.com&scope={scopes}&redirect_uri={redirectUrl}&client_id={ClientId}&client_secret={ClientSecret}&refresh_token={RefreshToken}&grant_type=refresh_token"
    },
    "scopeListDelimiter": {
    "value": " "
    }

    We were unable to find any documentation at all about these properties or how they work or what things the apiProperties.json file supports. We basically had to reverse engineer other connectors with trial error wasting a lot of time for this...

     

    All we found was another user asking for documentation for these things which was never properly replied to: https://powerusers.microsoft.com/t5/Connector-Development/OAuth2-customParameters/td-p/1582874 

  • joelengelhardt Profile Picture
    12 on at

    WOW! This worked! Thank you so much for sharing this knowledge! This and that other article are the ONLY (2) spots this information is available on the internet! I follow your post and successfully enabled a Custom Connector! Thank you! 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard