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
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!
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.
Hello, sorry to resurface this thread. I have two gsuite scope but on different xaml files. One is for updating google sheet, and one is for sending email. How can I fix that it will re prompt every run? Two of them reprompt everytime.