Ask Your Question

LibreOffice access to Google Drive asks for authentication 6-digit pin

asked 2017-06-07 22:34:58 +0200

aarone gravatar image

updated 2020-07-10 22:01:13 +0200

Alex Kemp gravatar image

When I try to save a document to my google drive account, after adding google credentials I'm asked to put a 6-digit authentication pin. How do I get it?


edit retag flag offensive close merge delete


Good question.

I've decided to make the switch to LibreOffice (on Windows 10) from Office. I tried to connect to my Google Drive (which has 2FA) and this is the same problem that I encountered. All in my first ten minutes. Worse, is that though this question has received over 3,000 views, not one person from the developers or the user community is willing to offer an answer. In all, not the greatest welcoming experience or first impression for a new user.

Any ideas? Anyone?

libusr gravatar imagelibusr ( 2018-04-24 17:46:40 +0200 )edit

There is a work around...but you must have access to your Google Drive from within your computer's directory system.

If you have, then you can ignore the seeming non-functionality of 'Save Remote' and instead simply select 'Save As' and locate the Google Drive directory as the destination for your saved file.

libusr gravatar imagelibusr ( 2018-04-24 17:54:51 +0200 )edit

This is a two step/phase verification. You must provide your mobile number to Google for them to send you a SMS text message to your mobile phone in order for you to authenticate on the system. Either the number on your account is incorrect or the phone number does not accept SMS messages. You can set this up on multiple social sites such as Facebook, Intstagram, LinkedIn, etc. Which is a good idea to keep your accounts your own.

Daverrr gravatar imageDaverrr ( 2018-05-16 17:44:05 +0200 )edit

I gave Google my mobile number, and let turned on 2FA with it. It does not send the confirmation texts though. I also tried using Google Auth. I got it to prompt me for the auth code from Google Auth, when signing in to gmail on the desktop computer web browser. That confirms that it was 2FA was successfully turned on. When I try to save the file to the remote drive, LibreOffice says the drive is invalid. LibreOffice on Linux

bpracht gravatar imagebpracht ( 2019-11-16 22:27:50 +0200 )edit

Tried both Google Drive and OneDrive, got the same error "invalid device" on both. I don't have time for this. Bye bye LibreOffice.

adrice gravatar imageadrice ( 2020-09-14 13:11:26 +0200 )edit

Just checking if this is still a problem? I cannot get the Google Drive connection to work as at May 2021, Libreoffice (x64) on Windows 10. Am I doing something wrong, or just wasting my time trying?

Shed_4625 gravatar imageShed_4625 ( 2021-05-06 00:31:01 +0200 )edit

14 Answers

Sort by » oldest newest most voted

answered 2018-09-05 08:36:40 +0200

sberg gravatar image

updated 2018-09-05 09:57:51 +0200

Found that, depending on the characters in your username/password, they were not correctly encoded when talking to Google, so authentication failed (and the code then falls back to asking for a two-factor 6-digit pin but which you wouldn't receive from Google, whether or not you have two-factor authentication enabled for your account). Should be fixed with "Properly encode OAuth2 credentials" (on master towards LO 6.2, but there's also backports to 6.0.x and 6.1.x planned; see that link for details).

edit flag offensive delete link more


@sberg Many thanks for the post. Have tried to answer this many times since it always worked for me but others seemed to continue with problems. Good to know where the problem is and that there is a fix coming.

Ratslinger gravatar imageRatslinger ( 2018-09-05 20:21:57 +0200 )edit

ok thank you. But can you give me steps of what I need to do once I click on the link I am totally not understanding what I need to do once I get to that page. Thank you in advance.

BrazilBuzz gravatar imageBrazilBuzz ( 2019-01-04 19:02:56 +0200 )edit

@sberg It seems not solved at this day. I just moved do 6.2 but nothing changed.

Jean-no gravatar imageJean-no ( 2019-02-07 16:07:04 +0200 )edit

I just moved to 6.2 and get invalid device even though I deactivated 2 FA.

JEDIMASTER gravatar imageJEDIMASTER ( 2019-02-07 19:42:44 +0200 )edit

Beyond the issue with certain characters in your username/password (the fix of which should meanwhile have been rolled out to all relevant LibreOffice installations), there is apparently a further (as of yet unaddressed) issue that causes failures for some Google accounts but not for others. See "Failure logging into some Google Drive accounts, but not into others" for all the technical details (libcmis is the underlying software that LibreOffice uses to connect to Google Drive).

Again, what is confusing is that, due to how things are coded on the LibreOffice side, a failure to connect (for whatever reason) will typically bring up the 6-digit two-factor authentication dialog, whether or not you are actually using two-factor authentication. So when that dialog comes up when it shouldn't, that actually means LibreOffice was unable to connect, for unclear reasons.

sberg gravatar imagesberg ( 2019-02-08 15:10:46 +0200 )edit

Still happening with Version: (x64). No 2FA allowed for my G account and the popup for 6d PIN is there.

harkunglo gravatar imageharkunglo ( 2019-08-12 12:13:24 +0200 )edit

answered 2019-10-24 17:44:21 +0200

fabrizioprocopio gravatar image

It's so strange that the staff does not solve. it's very very strange... in so many years A so necessary service... Some commercial stuff behind? Some deal?

edit flag offensive delete link more


As this is posted as an answer, how does it answer the question? Please delete and post using add a comment.

"Staff" as you state are volunteers from around the globe who submit changes, on their own time, to the software. If there is no volunteer willing to make the change it remains open. You could submit the change if so inclined.

Ratslinger gravatar imageRatslinger ( 2019-10-24 18:13:49 +0200 )edit

answered 2019-12-12 21:07:41 +0200

EasyTrieve gravatar image

updated 2019-12-12 21:08:24 +0200

I ran into this in when I tried to run the Libre Office Writer app there.


  1. select my RollApp profile (by clicking on my username in the upper right of

  2. Select Cloud Storage in the shortcut menu

  3. In the right pane user Connect New Storage, click Google Drive and go thru the setup process

Now I can see and open LO documents using RollApp's LibreOffice apps.

edit flag offensive delete link more

answered 2017-11-08 20:17:15 +0200

Joe H gravatar image

I saw the 'Open Remote File' option today for the first time and decided to try it as I have files on Google Drive. I do have 2FA enabled so I was not surprised to get authentication from my phone but it does not provide me with a code. Instead it just asks me to confirm that I am logging in from another computer. As LibreOffice will not proceed without the code, even though the 2FA worked, I am stuck. Any suggestions?

edit flag offensive delete link more


@Joe H See my answer on this post. Has worked repeatedly for me.

Ratslinger gravatar imageRatslinger ( 2017-11-08 20:33:37 +0200 )edit

thanks @Ratslinger this also worked for me :)

cicindel gravatar imagecicindel ( 2018-06-08 09:24:10 +0200 )edit

Joe this worked for me until I enabled 2-step authorization. now get a "General Input.output error"

kmcaron gravatar imagekmcaron ( 2018-08-08 04:01:27 +0200 )edit

When I put in the 6 digit pin from the GOOGLE Authenticator App I get : The specified device is invalid

JEDIMASTER gravatar imageJEDIMASTER ( 2018-10-23 15:30:23 +0200 )edit

answered 2018-12-03 15:41:11 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I too need some help! I am unable to configure LibreOffice to get and save to GoogleDrive. It keeps on referring to the "Google Drive asks for authentication 6-digit pin" but no pin is sent/received. I have tried with and without Google's 2-Step Verification, but no luck. I see a number of online forums highlight this. Is there any possibility this will be able to be configured and work? I rely heavily on saving and editing documents on GoogleDrive locations and using LibreOffice. GoogleDoc has a few limitations for me. Any guidelines will help.

edit flag offensive delete link more

answered 2019-01-04 19:48:19 +0200

I need help too. I can't get Libreoffice to connect to Google drive without it asking for the 6 digit authentication code. Looks like from what I understand that it will be coming in a new upgrade in the future, how long does that usually take? I need to save things to the cloud I don't trust my computer, had them die too many times not willing to loose data again, libreoffice is very good, but this part is not, I am a new user and am impressed up until this. hoping for a fix really soon or I may have to move on to something else.

edit flag offensive delete link more

answered 2019-04-06 15:56:11 +0200

Hello, today April 6 2019. LibreOffice running on Linux Mint 19.1.

Problem still not solved. Cannot access Google Drive account from LibreOffice, as expected. LibreOffice ask me for a 6-digit pin code, but Google did not send any code to my smartphone. I had tried with and without the 2-step verification.. no success anyway. . Could the developers devote some extra time to solve this problem ? It affects a lot of users Thanks, Giovani , Brazil

edit flag offensive delete link more

answered 2020-04-15 13:14:44 +0200

Bastiaan gravatar image

updated 2020-04-15 13:25:20 +0200

On linux it turns out you can just use gnome's online accountsto connect to google (and i suppose KDE has a version too). The drive will appear in your file manager (file aka nautilus) as You can then use the 'normal' way of opening all your files located on your google drive.

I was puzzled by this too. I do not want to give my phone number to google, then what? Would be nice if a user can choose which authentication method to use in the first place and that libreoffice is just recognizing the gnome online accounts already created and lists them automatically in the remote services.

One thing I noticed. I cannot open files from the filemanager directly by double clicking a file as the google-drive file format was not recognised. I can open them via libreoffice directly

edit flag offensive delete link more

answered 2019-11-17 14:48:16 +0200

daifu gravatar image

updated 2019-11-17 14:51:10 +0200

This worked for me. It all has to do with Google apparently. This is what I do to solve Libreoffice's login into Gdrive on my computer. I run DEBIAN 10

  1. Go into GMail
  2. Go to MANAGE YOUR GOOGLE ACCOUNT (it's right upper corner under the icon for your account)
  3. Go to SECURITY
  5. SECURITY ISSUES FOUND - I found Libreoffice listed here
  6. Grant access to Libreoffice (it will ask if you are sure - say YES)
  7. Make sure under Signing in to Google you signin the old fashion way, no phone, no 2 step verification. Plain email and password signin
  8. Turn on Less secure app access
  9. Make sure you are auto signing in into your ONLINE ACCOUNTS in your computer.
  10. I had to reboot to have everything working

Can someone verify if this works. I will be trying this on my work's computer this week also. Let you know

edit flag offensive delete link more


Still doesn't work.

Ratslinger gravatar imageRatslinger ( 2019-11-17 23:11:06 +0200 )edit

answered 2019-09-23 19:49:21 +0200

johnwmcc gravatar image

Well, I have the same problem with a newly installed latest version

Google offers to let me create a FOUR digit pin, which I didn't have. But LibreOffice asks for a SIX digit pin.

And doesn't get Google to send me a 2FA code either.

So I'm stuck.

And connection to OneDrive doesn't work either, for an unexplained reason, although Microsoft have emailed me twice to say the LibrOffice has been added as an authorised app.

edit flag offensive delete link more



It continues to surprise me how many people continue to ask a question (or post a comment) as an answer. Please use answers only to respond to original question. Otherwise search other questions and if answer is not found either ask a new question (this one already asked many times) or post as a comment.

Google Drive and One Drive have not worked for some time. No one (to my knowledge) has undertaken a fix to either. Please see answer by @Opaque and comments in this post for Google Drive -> Libre office remote files with google authenticator code (six digital pin)

Ratslinger gravatar imageRatslinger ( 2019-09-23 20:03:30 +0200 )edit

Very sorry - I thought I had clicked on 'Add a comment' but it then appeared as an Answer, which of course it isn't. My mistake, and my apologies.

johnwmcc gravatar imagejohnwmcc ( 2019-09-23 20:05:44 +0200 )edit

Thanks for the response. It just amazes me how often this actually happens.

Ratslinger gravatar imageRatslinger ( 2019-09-23 20:12:23 +0200 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-06-07 22:34:58 +0200

Seen: 35,685 times

Last updated: Apr 15 '20