Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Snowflake connector in Power Automate doesn't refresh OAUTH tokens

(2) ShareShare
ReportReport
Posted on by 46

Hello there,

I've been trying out the newly added Snowflake connector (https://learn.microsoft.com/en-us/connectors/snowflakeip/). After following the readme the connector itself works flawlessly, for a short amount of time. After about 2 hours of use the actions using this connection will response with "Unauthorized" and "code""390303""message""Invalid OAuth access token. ...oRif_YACXg".

 

To get it working again I need to manually go to the Connections tab and "switch connection" just to sign in again. After that the token is refreshed. This isn't of course very convenient as we are trying to automate things here. 

 

Any ideas?

  • Ayliac Profile Picture
    Ayliac 3 on at
    Re: Snowflake connector in Power Automate doesn't refresh OAUTH tokens

    Update: the solution above works! 

  • garttim Profile Picture
    garttim 5 on at
    Re: Snowflake connector in Power Automate doesn't refresh OAUTH tokens

    I was running into this issue in our environment and came across this article - FAQ: Common Issues When Using the Snowflake Connector on Logic Apps, Power Automate and Power Apps. Specifically, this bit helped: 

    I am seeing the "Invalid OAuth access token. ...<random string>" error from the Azure side, what should I do?
    The most common cause of this error is invalid audience validation. If you have an existing OAuth integration for Power BI SSO with 'https://analysis.windows.net/powerbi/connector/Snowflake', please make sure that you add 'https://analysis.windows.net/powerbi/connector/snowflake' to the audience list:

    ALTER SECURITY INTEGRATION SF_CONNECTOR
    SET EXTERNAL_OAUTH_AUDIENCE_LIST = ('https://analysis.windows.net/powerbi/connector/snowflake', 'https://analysis.windows.net/powerbi/connector/Snowflake');

     

    In my case, we already had an integration set up in Snowflake for PowerBI which used the URL in the audience list where "Snowflake" used a capital S. I had our Snowflake admin alter the audience list to include the URL with the lowercase s and it seems to have resolved the issue.

  • Nik968 Profile Picture
    Nik968 2 on at
    Re: Snowflake connector in Power Automate doesn't refresh OAUTH tokens

    Facing the same issue...

  • Dynamo Profile Picture
    Dynamo 46 on at
    Re: Snowflake connector in Power Automate doesn't refresh OAUTH tokens

    Unfortunately no, I came to the conclusion that the connector is unusable as of now and decided to build a function app for the Snowflake connection which is then used from the Flow. 

  • jigglyjiggly Profile Picture
    jigglyjiggly 2 on at
    Re: Snowflake connector in Power Automate doesn't refresh OAUTH tokens

    @Dynamo We encountered the same issue. Did you manage to find a solution for it? 🙂

     

     

  • chuck3138 Profile Picture
    chuck3138 22 on at
    Re: Snowflake connector in Power Automate doesn't refresh OAUTH tokens

     

    i guess if the user account you are using in the snowflake connector have the same email address as the Azure account you are using to login, then when Azure session expired, your snowflake connection will be disconnected too.

     

    you probably want to use API access key and secrets to create a permanent connection to the snowflake api.

     

    that's my guess

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,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard

Featured topics