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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom Connector - Gen...
Power Automate
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?

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

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard