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

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript