GSuite Package Requires Authentication Everytime

Hi All,

I have been using the UiPath GSuite Package with the OAuth authentication method.
https://go.uipath.com/component/google-gsuite
My issue is that the package does not remember the authentication and each time that I go to run this bot, it will pop up wanting a user to authenticate the UiPath having access to my emails.

This issue is the same that has been posted in this post, however there has been no resolution posted to date.

Does anyone have any experience with getting this to work. Below is a snippet of how i have provided the credentials to GSuite Scope.
I have tried populating the UserEmail field and also not populating this field, however it does not appear to make a difference. Running UiPath V2018.4 and the latest version of the Google GSuite package v1.1.1

Hi Nicholas,

First off, the combo box allowing you to select between ApiKey, OAuth2ClientId and Service account key means the activity will only require and use the inputs in those respective categories. So, a OAuthClientId auth type means you only need/use a ClientId and a ClientSecret.

Since it is very hard to find the problem you are facing without more data, let me dive into the behaviour of the activity in the hopes the extra information will help you figure it out.

The package remembers and loads all of the generated token response per Windows user. If a new request is made with the same credentialId, it loads the saved cache from %appdata%\Datastore.GSuite folder. If a token response file matching the CredentialID is found, the new scopes match the scopes of the same token response, and the refresh token (not access token) is still valid you should not get the consent prompt.

In other words, check that you are using the same Windows user on the robot (since %appdata% is per user), that the session data does not expire at the end of a robot run (robots are persistent) and that you do not change scopes between runs (this always causes re-authentication).

If all of the above is true then it should be working and i will need more information to help! Good luck!

3 Likes

Hi @Mihai_Dunareanu,

Does this mean that if I have 2 google scopes in the workflow using the same clientID and clientSecret that it will re-prompt authentication each time?

I have checked %appdata%\Datastore.GSuite and i can see the Token response. Upon further inspection I can see that in the token response it has "expires_in":3600 which I guess it means it will expire each hour.

Thank you

1 Like

Hi Nicholas,

Correct, if you have two scopes using the same clientID and clientSecret but different services, it will prompt each time. If the two scopes are using the same services, it will not prompt.

3 Likes

Sir,
can you tell me how to stop getting Gsuite authentication as it is interrupting the robot.

Your help will be appreciated.

Thank you

Sorry to necro an old thread, but I started running in to this problem today myself.

You have to use service account authentication according to this: