Use case: * Created a shared drive "Demo_Folder" * For "User A" - gave Content manager access. For "User B" - gave Viewer access. * Uploaded 3 files (file1.sv, file2.csv and file3.csv) to Demo_Folder * For file3.csv, I would like to provide editor access to "User B". I was able to do this via UI. However, I am not able to do this using API.
Here is the code:
permission = {u'role':u'writer'} service.permissions().update(fileId=file_id,supportsAllDrives=True,permissionId=permission_id, body=permission).execute()
Error: googleapiclient.errors.HttpError: https://www.googleapis.com/drive/v3/files/<***********>/permissions/<********>?alt=json&supportsAllDrives=true returned "Cannot update or delete an inherited permission on a shared drive item.">