How to retrieve the Customer ID using the .Net provided libraries for the Audit Admin APIs

12 views
Skip to first unread message

Rothgar

unread,
Sep 26, 2012, 9:27:21 AM9/26/12
to google-app...@googlegroups.com
I am trying to use the .net provided libraries (from here:  http://code.google.com/p/google-api-dotnet-client/wiki/APIs#Enterprise_Audit_API) to build a client application to access auditing data.
I have created my api console application so I have my "client ID" and "client secret". I have enabled the Audit API for my project and have enabled the provisioning API for my domain, and have the right scopes for my oAuth calls.

I am using Google.Apis.Authentication.OAuth2 to retrieve and store my auth and refresh tokens which is working well. 

My issue is I am stuck at the point of trying to programatically extract the customerId through the provided .net libraries or call the proper library API to get the customerId so I can insert it in the call:
Google.Apis.Audit.v1.AuditService.Activities.List(customerId, applicationID).BeginFetch(callbackmethod, objectState);

I could switch from the provided libraries to making WebRequests and reading response streams, but it seems to go against the whole intent of the provided libraries.
This may be self evident to some but being new to web based programming and to Google API it is unfortunately not to me.
I have searched extensively and have yet to see a .net example of retrieving the customerId using the provided APIs and using it in an auditservice call.
Maybe I am making a wrong assumption about the provided libraries...

I appreciate any help - thanks
Reply all
Reply to author
Forward
0 new messages