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 :
Power Automate - Using Connectors
Answered

Custom Connector - Generic Oauth2 - Google Oauth - Refresh Token

(1) ShareShare
ReportReport
Posted on by 13

Hello, 

I created a custom connector that uses Generic Oauth2 identity type to connect to a Google API.  I am able to create a connection with my Google creds, however I have to fix the connection every hour (that aligns with the access token expiration time).  

Per Google Oauth2 docs, access_type=offline is a required parameter for Google to send a refresh token in the authorize response.  Is there a way to add additional parameters in the custom connector in Power Automate? 

I tried meddling with the auth url (adding &access_type=offline) however that results in a malformed url as list of query params start with a '?' and Power Automate appends '?' to beginning of the first param.  Appending the access_type to clientId and secret results in "invalid creds" errors.  Adding this access_type parameter at the end of scope throws a bad scope error from Google since its not an accepted one. 

Any thoughts on potential options?

I have the same question (0)
  • Verified answer
    srinathsub Profile Picture
    13 on at
    Re: Custom Connector - Generic Oauth2 - Google Oauth - Refresh Token

    Closing the loop here.  I was able to use "Google Identity" security instead.  The only catch is that, if you had accepted the API consent prompt for your account earlier, you have to manually remove it from your google account.  If not, the connection will not re-prompt the consent, thereby not getting a refresh token from Google Auth. 

    It could be more easier/intuitive in power automate, if the connection would re-prompt for an API consent regardless from the user to obtain a refresh token as well upon successful auth.

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

Coming soon: forum hierarchy changes

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
Tomac Profile Picture

Tomac 544 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 482 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 287

Last 30 days Overall leaderboard

Featured topics