With Google Drive APIs, I am able to initalize DriveService Object using OAuth2.0, but don't know how to initialize AppsService object of Google Provisioning API to work with Domain Gorups and Users. I tried
AppsService _appService = new AppsService("DOMAINNAME", "AuthenticationTokenFromDriveServiceObj");
But, getting "Invalide Token" exception.
- It looks like Google Provisioning APIs are still not able to handle Google Drive APIs. am I correct here?
- Are Google Provisioning APIs are deprecated by Google? refer link https://developers.google.com/google-apps/admin-api-deprecation-list
Edited:
I am getting Drive service Object from the code given at: https://developers.google.com/drive/delegation#instantiate_a_drive_service_object [Here, I tried adding provisioning API scopes also] And then
PermissionList permissions = _DriveSevice.Permissions.List("root").Fetch();
string userName = permissions.Items[0].Name;
string authenticationToken = auth.State.AccessToken;
AppsService _AppService = new AppsService("DOMAINNAME", authenticationToken);
_AppsService.RetrieveAllUsers(); //This statement errors out