Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

(2) ShareShare
ReportReport
Posted on by 70

Hello,

 

I have a custom connector which uses oAuth authentication (Generic oAuth).

 

I am using environment variables for my client id and secret which in turn connects to Azure Key Vault. But when I import the solution in the environment it seems the client secret is getting cleared inside the custom connector. I am using client secret as @environmentVariables("clpr_ClientSecret") inside my connector.

 

Then I have to edit the connector manually in the solution in the target environment and put the client secret again as @environmentVariables("clpr_ClientSecret"), which solves the problem, but it turns my solution from managed to unmanaged solution( which is a bigger problem).

 

Not sure what can be done here? this does not seem to be desired behavior

 

In my export of the solution the connector connection parameters file is missing client secret. This has been changed recently may be with new powerapps platform version as in my previous solutions i can see client secret as well-

 

{
    "token": {
        "type""oauthSetting",
        "oAuthSettings": {
            "identityProvider""oauth2",
            "clientId""@environmentVariables(\"clpr_ClientID\")",
            "scopes": [],
            "redirectMode""GlobalPerConnector",
            "properties": {
                "IsFirstParty""False",
                "IsOnbehalfofLoginSupported"false
            },
            "customParameters": {
                "AuthorizationUrl": {
                    "value""https://login.microsoftonline.com/<tenantid>/oauth2/authorize"
                },
                "TokenUrl": {
                    "value""https://login.microsoftonline.com/<tenantid>/oauth2/token"
                },
                "RefreshUrl": {
                    "value""https://login.microsoftonline.com/<tenantid>/oauth2/token"
                }
            }
        }
    }
}
 
Also there are few more properties that are updated as shown below.
 
sohilbhalla_0-1710744097606.png

 

left is old solution exported 2 weeks back and right is new solution exported yestarday.

 

It seems MS has changed few things.

 

Anyone else had this issue? Any help is highly appreciated. Thank you. 

Categories:
  • Rfarris2000 Profile Picture
    Rfarris2000 23 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    It appears this is now fixed.  I've just tested it.

  • CarinaMClaesson Profile Picture
    CarinaMClaesson 8 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    I recommend to create a Microsoft ticket of your own (if you have not already done that). Then Microsoft will look at your specific case. They can also keep you updated about the fix and when it has been deployed to all regions. 

  • Rfarris2000 Profile Picture
    Rfarris2000 23 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    Just tried this morning and it's still not working.  So frustrating.

  • CarinaMClaesson Profile Picture
    CarinaMClaesson 8 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    @sohilbhalla I was in contact with Microsoft Support again and the fix is deployed region wise. It is targeted for this weekend to be available everywhere so hopefully next week all will be ok also for you. This is what my exported file (connection parameters) looks like now. 

     

    Exported Custom Connector connection parametersExported Custom Connector connection parameters

  • sohilbhalla Profile Picture
    sohilbhalla 70 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    @CarinaMClaesson  Just did the export after setting the client secret as environment variable, but unfortunately still client secret is missing in the exported file.

     

    Can you please share your connector connection parameters file for a reference? Thank you

     

  • CarinaMClaesson Profile Picture
    CarinaMClaesson 8 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    I have had the same issue for the past weeks. I got confirmed from Microsoft Support that this is a bug. It has now been fixed and all is good for me again. It did not work directly though, I had to open the custom connector in my development environment, edit the OAuth 2.0 settings on the security tab. I updated the client secret field with @environmentVariables("myPrefix_envVarName") and saved. After that I was able to export the solution and the client secret was included in the exported file. So go and update your custom connector in the development environment and export it. Hopefully this is working for you now.

     

  • SimonSays Profile Picture
    SimonSays 168 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    Same for me. I find it incredible that this issue has been bouncing around since 2021. I hoped that there might be a workaround using the Power Platform Toolkit in DevOps but this has so far alluded me. Any Microsoft folks seeing this?

  • Rfarris2000 Profile Picture
    Rfarris2000 23 on at
    Re: PowerApps Custom Connector oAuth Client Secret Missing when Exporting the solution

    We are seeing the same issue.  I've had to manually update our custom connector as well.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard