Google ドライブ API を使用すると、OAuth2.0 を使用して DriveService オブジェクトを初期化できますが、Google Provisioning API の AppsService オブジェクトを初期化してドメイン グループとユーザーを操作する方法がわかりません。私は試した
AppsService _appService = new AppsService("DOMAINNAME", "AuthenticationTokenFromDriveServiceObj");
ただし、「無効なトークン」例外が発生します。
- Google Provisioning API はまだ Google Drive API を処理できないようです。私はここで正しいですか?
- Google Provisioning API は Google によって廃止されていますか? リンクを参照してくださいhttps://developers.google.com/google-apps/admin-api-deprecation-list
編集:
次のコードからドライブ サービス オブジェクトを取得しています: https://developers.google.com/drive/delegation#instantiate_a_drive_service_object [ここでは、プロビジョニング API スコープも追加してみました] そして、
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