I have created a service account to access the user google sheet to download it in excel format.
Let's say my Domain id is - [email protected] and service account id - [email protected]
When I try to download the google sheet with a google sheet id from the service account I get this error.
Google.Apis.Requests.RequestError
File not found: 1-mhsKJ1THbROA7yXRye3JI6cWANAdiMxoD5fKQ-jvSI. [404]
Errors [
Message[File not found: 1-mhsKJ1THbROA7yXRye3JI6cWANAdiMxoD5fKQ-jvSI.] Location[fileId - parameter] Reason[notFound] Domain[global]
]
But when I share the google sheet from domain id with the service account id, I am able to download the google sheet.
Can service account access the drive of domain user without sharing the sheets to download it.