After modification of Google Groups, permission is not reflected in google drive - google-drive-api

I give READ permission to GROUP1 on FOLDER1
Already existing members in GROUP1 can find FOLDER1 in Shared Folder list (Good)
I add new member called JOHN in GROUP1
JOHN is not able to find FOLDER1 in Google Drive or using google drive sdk (VERY BAD)
I am creating an application that rely on groups for google drive permission. This is a blocker now.
Why is this happening and how can I fix this issue or is there a workaround.

As per resolution given in Resolve common Google Drive issues in Google Apps Administrator Help:
The Shared with Me view shows only items that have been shared with you explicitly. This includes items shared with you via a small group (with up to 200 members). If an item is shared with a larger group, it won’t automatically show in your Drive unless you click the link in the sharing invitation email.
With this, you must send a sharing invitation email to JOHN with the link to the shared folder/file. John can access the document through that link.

As teyman mentioned this is a known issue/feature of Google Drive. To workaround you could:
after adding member, remove group acl on Drive folder and re-add so new member is evaluated properly.
provide email, Google Site or other link to new member which direct user to folder so that they can find in Drive.
as the new member, add 'root' as a parent of the folder so that folder appears in new member's My Drive.

Related

Transfer files from Google Drive to a different domain

How can I transfer all my files from a google drive account to another google drive account, but from different domain and organisation.
I tried with Transfer Ownership, but I recieve an error when I choose to which user I want to transfer the files.
"Error: Select a user from search results"
Transfer of Ownership with Google Drive
It would be important to clarify at first what is possible and the workarounds. First we need to make sure that your organization has enabled the option to share files with outside users or make it public.
The [transfer of ownership][1] is only available or allowed between users from the same organization.
Method 1 (Make a Copy)
The first method that I suggest is to move all data to a folder from your Drive and share that folder directly with the other user. For example the folder would be under user "A" and you would share it with the user from another domain, the user "B".
Login to with user "B" and check under "Recent" option over, it should be on the left of the Drive UI.
You should be able to access the folder that was recently shared or with the link of the folder (I suggest having the user "B" account under an incognito window). You can start from there picking the files and making a copy, the copy would be under the ownership of user "B".
Method 2 (Shared Drives)
If your new organization or domain has Shared Drives, you should be able to add the external users as "Manager", you would need to add user "A". This way the user "A" would be able to move files directly to the Shared Drive, and due to the Shared drives not having owners but "Managers" or other permissions, the file becomes part of the new organization and is available to be moved by the users of the new organization.
Method 3 (Google Takeout)
If none of these options helps you, you can utilize Google Takeout to download all your Google Data.
You can review how it works below:
https://support.google.com/accounts/answer/3024190
References
https://support.google.com/a/answer/7374057
https://support.google.com/drive/answer/2375091?hl=en&co=GENIE.Platform%3DDesktop#zippy=%2Cmake-a-copy-of-a-file
[1]: https://support.google.com/a/answer/1247799?hl=en
In addition to Ricardo's full answer:
Method 2b (automated)
Even if your Google Workspace has no Shared Drives you might use this method with Google Drive add-on or web-app.

Object level authorisations or ACLs in Google Shared drive

Does Google Shared drive have any object level authorizations or ACLs ?
Currently i only see that there are members of the shared drive and they get apply to all the files and folders in the shared drive.
How do i achieve the following scenario ?
Shared Drive 1
Folder 1
File 1
Folder 2
File 2
I want user A to have access to Folder 1 under Shared Drive 1 and user B to user access to Folder 2. But it seems its not possible in Google shared drive.
Best Regards,
Saurav
You can share a folder under a Shared Drive if you right click on that designated folder and click on the Share Button. Here are a list of scenarios that will happen once it is done:
The user will be notified via email that the folder has been shared.
The user will not have any visibility on the source Shared Drive where that designated folder is located. He will simply have access to the folder and all of its contents.
Another important note to consider for you to be able to achieve this:
Make sure that the Shared drive settings option is set to allow "People who aren't shared drive members can be added to files".
This can be done through the Google Workspace Admin Console under Apps > Google Workspace > Drives and Docs > Manage shared drives. And, on the list of Shared Drives, you should see the settings when you hover over the items on the Shared Drive list.
Reference:
https://support.google.com/a/answer/7662202?hl=en#zippy=%2Crestrict-access-for-an-existing-shared-drive
For further assistance regarding this matter I'd best advise you to contact Google Workspace Support

User with edit privileges made files I own not viewable by me

I shared a folder containing files and subfolders with files with multiple users and gave them edit permissions. One users account has modified the viewing ability(?) of every file and subfolder they had access to. From my account when I open the top level folder I see it empty but I know these files are still there because I own the majority of them and my drive storage amount hasn't changed.
The user claims they have no idea how it happened so maybe that it was an app they unknowingly gave drive access to?
Is there any way I can fix this from the Google Drive web interface? I found Google Apps Scripts has access to the Drive API, should I find a script that can mass change the permissions?
Only the owner can delete the file.
The files were removed from the folder but were not deleted.
Therefore, they take up disk space.
To view files outside the folder, follow these steps:
https://drive.google.com/drive/search?q=is:unorganized%20owner:me
Excuse my bad English
Venca

How does listing files/folders inside of google drive work?

I have been reading the reference and also used the API explorer, but I cannot for the life of me manage to get a full list of what's inside a specific folder of my google drive.
As far as I understand, the following code should list all files inside the folder that has the given folderID. That does work; but only on files that I created from my app. Folders/files created with or uploaded through the web UI will not show up in the response.
const folders = await drive.files.list({
q: "'<folderID>' in parents",
trashed: false,
spaces: ['drive']
});
In a different post I found that the scope might be the issue, but as far as I know I have already given my app the highest available scope:
const SCOPES = ['https://www.googleapis.com/auth/drive'];
I appreciate any help on this matter. :)
Your symptoms are consistent with using drive.file scope instead of drive. Is it possible that you granted access using drive.file and haven't yet repeated the grant procedure with drive?
The other possible explanation is that you are in two different Drive Accounts. Many people use a Service Account because the Google docs refer to this as server-to-server, without realising that the Service Account is a totally different account to their User Account, ie. the one with the Drive UI. So your app will be uploading and reading files in the Service Account, your UI-created files are in your User Account.

Google Drive API - Override Owner in Shared Folder

When sharing a folder, is it possible for the owner to override permissions of the files other writers have created under the folder? Hopefully this can be done with a normal Google account, but requiring Google Apps access is also OK (as long as we only need the owner's, not an admin's credentials to do so)
As far as I know, files inside the shared folders inherits the sharing permissions set by the folder owner. Which means that, permissions set by file owners were overridden by the permissions set by the folder owner as demonstrated in this YouTube video - Steegle.com - Google Drive & Docs - Sharing.
However, please note that there are only certain operations which the folder owner can permit and this does not include change of ownership of files as given in Types, roles and values: how the permissions work.
This discussion on Sharing folders vs sharing files - which has priority in Google Docs Help Forum might also help.