Replies: 2 comments 5 replies
-
Hi Louis-Philippe, |
Beta Was this translation helpful? Give feedback.
2 replies
-
Is this for a certified connector or for an internal connector? Let me alert the connector team to see if something has changed on the backend. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to create a custom connector that will authenticate the users using OAuth2, but also need to ask for a project URL. That pattern works fine when using API Key, but doesn't seem to be working when configured for OAuth. I have 2 specific need, the first one is to be able to as for the project URL, which would then be set as a header for requests made by the power platform using the set header policy.
The other one I would like to do, is to transform the OAuth2 requests to use the same project URL in the scopes of the OAuth2 request. Basically having dynamic scopes.
I tried this for the first requirement of the header, but no luck in getting the UI to ask for the Project URL:
{ "properties": { "connectionParameters": { "token": { "type": "oauthSetting", "oAuthSettings": { "identityProvider": "oauth2", "clientId": "c995f09f-8f94-4c92-99f7-c3c4d61bc22e", "scopes": [ "openid" ], "redirectMode": "GlobalPerConnector", "redirectUrl": "https://global.consent.azure-apim.net/redirect/experlogix-20cpq3-5f7895d93834834834-5fef17f9c88018564c", "properties": { "IsFirstParty": "False", "IsOnbehalfofLoginSupported": false }, "customParameters": { "AuthorizationUrl": { "value": "https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize" }, "TokenUrl": { "value": "https://login.microsoftonline.com/organizations/oauth2/v2.0/token" }, "RefreshUrl": { "value": "https://login.microsoftonline.com/organizations/oauth2/v2.0/token" } } }, "uiDefinition": { "displayName": "OAuth Connection", "description": "OAuth Connection", "constraints": { "required": "true", "hidden": "false" } } }, "project_url": { "type": "string", "uiDefinition": { "constraints": { "required": "true", "hidden": "false" }, "description": "The URL to your CPQ project.", "displayName": "Project URL", "tooltip": "Provide the URL to your CPQ project." } } }, "iconBrandColor": "#007ee5", "capabilities": [], "publisher": "Louis-Philippe Perras", "policyTemplateInstances": [ { "templateId": "setheader", "title": "ProjectUrlHeaderPolicy", "parameters": { "x-ms-apimTemplateParameter.name": "X-PROJECT-URL", "x-ms-apimTemplateParameter.value": "@connectionParameters('project_url','')", "x-ms-apimTemplateParameter.existsAction": "override", "x-ms-apimTemplate-policySection": "Request" } } ] } }
I tried changing the order of the connection parameters but it looks like as soon as it finds a token of type oauthSetting, it won't look at the others. Is there anything I'm not seeing on how to accomplish this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions