GoogleCredential created by json private key file (ServiceAccount) - how to set the User to impersonate?
just starting with Google Apis. In my Google Cloud Platform account i created a Service Account for domain wide delegation. I saved a private key file in json format for this service account. In my test application i am creating a GoogleCredential instance: var credential = GoogleCredential.FromStream(new FileStream("privatekey.json", FileMode.Open, FileAccess.Read)) .CreateScoped(Scopes); How can i set the user i want to impersonate? When using a p12 private key i could do the following: var credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer("xxx@developer