Can’t download file using service account for file that was uploaded by another non-service accountQuota, orphaned files and uploads using service account with Google Drive APIGoogle API to upload files using the Authentication Service AccountUpload Files to Google Drive Using Service Account C#How to access Team Drive using service account with Google Drive .NET API v3download link for google drive object with service accountGoogle Drive, service account bulk uploadsHow to upload file to google drive with service account credentialCan a Google Service Account access a file from a user's Google Account?Google Drive API ownership of files service accountGoogle Drive Service Account quota limitation

Do infinite dimensional systems make sense?

What does the "remote control" for a QF-4 look like?

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Are the number of citations and number of published articles the most important criteria for a tenure promotion?

Why are electrically insulating heatsinks so rare? Is it just cost?

Doing something right before you need it - expression for this?

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Can a vampire attack twice with their claws using Multiattack?

Can a Cauchy sequence converge for one metric while not converging for another?

What are these boxed doors outside store fronts in New York?

Is it legal for company to use my work email to pretend I still work there?

What defenses are there against being summoned by the Gate spell?

Today is the Center

Why do I get two different answers for this counting problem?

Does detail obscure or enhance action?

Languages that we cannot (dis)prove to be Context-Free

strTok function (thread safe, supports empty tokens, doesn't change string)

What would happen to a modern skyscraper if it rains micro blackholes?

What's the point of deactivating Num Lock on login screens?

Fully-Firstable Anagram Sets

Watching something be written to a file live with tail

Can I ask the recruiters in my resume to put the reason why I am rejected?

How can bays and straits be determined in a procedurally generated map?

Why is Minecraft giving an OpenGL error?



Can’t download file using service account for file that was uploaded by another non-service account


Quota, orphaned files and uploads using service account with Google Drive APIGoogle API to upload files using the Authentication Service AccountUpload Files to Google Drive Using Service Account C#How to access Team Drive using service account with Google Drive .NET API v3download link for google drive object with service accountGoogle Drive, service account bulk uploadsHow to upload file to google drive with service account credentialCan a Google Service Account access a file from a user's Google Account?Google Drive API ownership of files service accountGoogle Drive Service Account quota limitation






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I'm struggling with a permissions problem in Google Drive. I have a google account (e.g. blah@domain.co.uk) that's part of an organisation. At the organisation level is a rule that prevents certain files being shared outside of the organisation. Within the blah@domain.co.uk is a service account with owner permissions. Using the Google Drive API v3 I can upload and download files to the organisations' Drive using the service account. If I manually upload a file (via the Web) using the blah@domain.co.uk account, I can't download the file via the API using the Google Drive API. I receive the following exception:-




Google.GoogleApiException HResult=0x80131500

Message=Google.Apis.Requests.RequestError File not found: . [404] Errors [ Message[File not found: ]
Location[fileId - parameter] Reason[notFound] Domain[global] ]




My guess is that because the service account (serviceaccount@project.iam.gserviceaccount.com) is outside of the organisation that the rule defined at the organisation level is preventing the service account downloading the file. But, that is a guess.



The folder that files are uploaded to and downloaded from has been shared to the service account with organise, add and edit.



Looking for ideas how to work around this…define a custom security policy to define an exception for the service account?










share|improve this question






















  • 404 Errors generally mean file doesn't exists to be found. In your case if the file exists and if there was a permission/access level issue then unauthorized access should have been issued. So, I request you to go through the error code of Google Drive API. If you are sure about access being the problem, then you need to create the exception case in the pre-set policy.

    – Hari Harker
    Mar 21 at 22:55











  • by organization do you mean gusite?

    – DaImTo
    Mar 22 at 9:07











  • Yes, by organisation I did mean gsuite. Anyway, I have managed to resolve this and it was as I had guessed - the rule at the organisation level preventing sharing of PII data outside of the organisation. The resolution was to add a group to the organisation that allowed accounts outside of the organisation to be members of the group. I added the service account to the group and then added the group as an exemption to the PII rule.

    – Mark
    Mar 22 at 11:37


















1















I'm struggling with a permissions problem in Google Drive. I have a google account (e.g. blah@domain.co.uk) that's part of an organisation. At the organisation level is a rule that prevents certain files being shared outside of the organisation. Within the blah@domain.co.uk is a service account with owner permissions. Using the Google Drive API v3 I can upload and download files to the organisations' Drive using the service account. If I manually upload a file (via the Web) using the blah@domain.co.uk account, I can't download the file via the API using the Google Drive API. I receive the following exception:-




Google.GoogleApiException HResult=0x80131500

Message=Google.Apis.Requests.RequestError File not found: . [404] Errors [ Message[File not found: ]
Location[fileId - parameter] Reason[notFound] Domain[global] ]




My guess is that because the service account (serviceaccount@project.iam.gserviceaccount.com) is outside of the organisation that the rule defined at the organisation level is preventing the service account downloading the file. But, that is a guess.



The folder that files are uploaded to and downloaded from has been shared to the service account with organise, add and edit.



Looking for ideas how to work around this…define a custom security policy to define an exception for the service account?










share|improve this question






















  • 404 Errors generally mean file doesn't exists to be found. In your case if the file exists and if there was a permission/access level issue then unauthorized access should have been issued. So, I request you to go through the error code of Google Drive API. If you are sure about access being the problem, then you need to create the exception case in the pre-set policy.

    – Hari Harker
    Mar 21 at 22:55











  • by organization do you mean gusite?

    – DaImTo
    Mar 22 at 9:07











  • Yes, by organisation I did mean gsuite. Anyway, I have managed to resolve this and it was as I had guessed - the rule at the organisation level preventing sharing of PII data outside of the organisation. The resolution was to add a group to the organisation that allowed accounts outside of the organisation to be members of the group. I added the service account to the group and then added the group as an exemption to the PII rule.

    – Mark
    Mar 22 at 11:37














1












1








1








I'm struggling with a permissions problem in Google Drive. I have a google account (e.g. blah@domain.co.uk) that's part of an organisation. At the organisation level is a rule that prevents certain files being shared outside of the organisation. Within the blah@domain.co.uk is a service account with owner permissions. Using the Google Drive API v3 I can upload and download files to the organisations' Drive using the service account. If I manually upload a file (via the Web) using the blah@domain.co.uk account, I can't download the file via the API using the Google Drive API. I receive the following exception:-




Google.GoogleApiException HResult=0x80131500

Message=Google.Apis.Requests.RequestError File not found: . [404] Errors [ Message[File not found: ]
Location[fileId - parameter] Reason[notFound] Domain[global] ]




My guess is that because the service account (serviceaccount@project.iam.gserviceaccount.com) is outside of the organisation that the rule defined at the organisation level is preventing the service account downloading the file. But, that is a guess.



The folder that files are uploaded to and downloaded from has been shared to the service account with organise, add and edit.



Looking for ideas how to work around this…define a custom security policy to define an exception for the service account?










share|improve this question














I'm struggling with a permissions problem in Google Drive. I have a google account (e.g. blah@domain.co.uk) that's part of an organisation. At the organisation level is a rule that prevents certain files being shared outside of the organisation. Within the blah@domain.co.uk is a service account with owner permissions. Using the Google Drive API v3 I can upload and download files to the organisations' Drive using the service account. If I manually upload a file (via the Web) using the blah@domain.co.uk account, I can't download the file via the API using the Google Drive API. I receive the following exception:-




Google.GoogleApiException HResult=0x80131500

Message=Google.Apis.Requests.RequestError File not found: . [404] Errors [ Message[File not found: ]
Location[fileId - parameter] Reason[notFound] Domain[global] ]




My guess is that because the service account (serviceaccount@project.iam.gserviceaccount.com) is outside of the organisation that the rule defined at the organisation level is preventing the service account downloading the file. But, that is a guess.



The folder that files are uploaded to and downloaded from has been shared to the service account with organise, add and edit.



Looking for ideas how to work around this…define a custom security policy to define an exception for the service account?







google-drive-sdk service-accounts gsuite






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 21 at 22:39









MarkMark

62




62












  • 404 Errors generally mean file doesn't exists to be found. In your case if the file exists and if there was a permission/access level issue then unauthorized access should have been issued. So, I request you to go through the error code of Google Drive API. If you are sure about access being the problem, then you need to create the exception case in the pre-set policy.

    – Hari Harker
    Mar 21 at 22:55











  • by organization do you mean gusite?

    – DaImTo
    Mar 22 at 9:07











  • Yes, by organisation I did mean gsuite. Anyway, I have managed to resolve this and it was as I had guessed - the rule at the organisation level preventing sharing of PII data outside of the organisation. The resolution was to add a group to the organisation that allowed accounts outside of the organisation to be members of the group. I added the service account to the group and then added the group as an exemption to the PII rule.

    – Mark
    Mar 22 at 11:37


















  • 404 Errors generally mean file doesn't exists to be found. In your case if the file exists and if there was a permission/access level issue then unauthorized access should have been issued. So, I request you to go through the error code of Google Drive API. If you are sure about access being the problem, then you need to create the exception case in the pre-set policy.

    – Hari Harker
    Mar 21 at 22:55











  • by organization do you mean gusite?

    – DaImTo
    Mar 22 at 9:07











  • Yes, by organisation I did mean gsuite. Anyway, I have managed to resolve this and it was as I had guessed - the rule at the organisation level preventing sharing of PII data outside of the organisation. The resolution was to add a group to the organisation that allowed accounts outside of the organisation to be members of the group. I added the service account to the group and then added the group as an exemption to the PII rule.

    – Mark
    Mar 22 at 11:37

















404 Errors generally mean file doesn't exists to be found. In your case if the file exists and if there was a permission/access level issue then unauthorized access should have been issued. So, I request you to go through the error code of Google Drive API. If you are sure about access being the problem, then you need to create the exception case in the pre-set policy.

– Hari Harker
Mar 21 at 22:55





404 Errors generally mean file doesn't exists to be found. In your case if the file exists and if there was a permission/access level issue then unauthorized access should have been issued. So, I request you to go through the error code of Google Drive API. If you are sure about access being the problem, then you need to create the exception case in the pre-set policy.

– Hari Harker
Mar 21 at 22:55













by organization do you mean gusite?

– DaImTo
Mar 22 at 9:07





by organization do you mean gusite?

– DaImTo
Mar 22 at 9:07













Yes, by organisation I did mean gsuite. Anyway, I have managed to resolve this and it was as I had guessed - the rule at the organisation level preventing sharing of PII data outside of the organisation. The resolution was to add a group to the organisation that allowed accounts outside of the organisation to be members of the group. I added the service account to the group and then added the group as an exemption to the PII rule.

– Mark
Mar 22 at 11:37






Yes, by organisation I did mean gsuite. Anyway, I have managed to resolve this and it was as I had guessed - the rule at the organisation level preventing sharing of PII data outside of the organisation. The resolution was to add a group to the organisation that allowed accounts outside of the organisation to be members of the group. I added the service account to the group and then added the group as an exemption to the PII rule.

– Mark
Mar 22 at 11:37













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55290290%2fcan-t-download-file-using-service-account-for-file-that-was-uploaded-by-another%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55290290%2fcan-t-download-file-using-service-account-for-file-that-was-uploaded-by-another%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현