コントロール パネル ベンダー (CPV) は、REST API を使用して CSP 顧客から同意を取得して削除し、テナントにアクセス許可を取得できます。
POST https://api.partnercenter.microsoft.com/v1/customers/{<customer_id>}/applicationconsents
Note
レート制限は、各 applicationId (CPV パートナーのアプリケーション ID) に対して 1 秒あたり 50 要求 (RPS) です。
同意を取得する
URI パラメーター
| 名前 | / | 必須 | タイプ | 説明 |
|---|---|---|---|---|
| customer_id | path | True | string | パートナー センターで生成された顧客の ID |
要求ヘッダー
メディアの種類: application/json
| 名前 | Required | タイプ | 説明 |
|---|---|---|---|
| Authorization | True | string | 対象ユーザー向けのアクセス トークン https://api.partnercenter.microsoft.com |
| 同意する | True | string | 受け入れ可能なコンテンツ タイプ。広く受け入れ可能な型 application/json |
| ms-correlationid | string | 要求を内部的に追跡するために使用されます。 ms-correlationid が指定されていない場合、サーバーは要求ごとに新しいものを生成します | |
| ms-requestid | string | 要求のべき等性に使用されます。 ms-requestid が指定されていない場合、サーバーは要求ごとに新しいものを生成します |
要求本文
メディアの種類: application/json
| 名前 | 種類 | 内容 |
|---|---|---|
| applicationId | string | CPV パートナーのアプリケーション ID |
| applicationGrants | Microsoft.Partner.Core.ApplicationConsents.ApplicationGrant[] | テナント内の顧客のアクセス権を取得するためのアプリケーション許可の一覧 |
応答
| 名前 | 種類 | 説明 |
|---|---|---|
| 200 OK | 要求は成功しました。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 201 Created | アプリケーションの同意が作成されます。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 400 Bad Request | 入力が見つからないか無効でした。 応答本文には、エラーの詳細が含まれています。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 401 権限がありません | 要求が認証されませんでした。 クライアントは、有効な対象ユーザーに対して有効なアクセス トークンを渡す必要があります。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 403 無効 | 要求は認証されましたが、呼び出し元にそれを呼び出す権限がないため、拒否されました。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 404 見つかりません | リソースが見つからないか、指定された入力パラメーターで使用できません。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 500 内部サーバー エラー | パートナー API サービスまたはその依存関係の 1 つが要求を満たできませんでした。 呼び出し元は要求を再試行できます。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
定義
Microsoft.Partner.Core.ApplicationConsents.ApplicationGrant
| 名前 | 種類 | 説明 |
|---|---|---|
| enterpriseApplicationId | string | アクセス権を取得するリソースの GUID 表現 |
| scope | string | アクセスを取得するためのスコープのコンマ区切り値 |
同意を削除する
DELETE https://api.partnercenter.microsoft.com/v1/customers/{customer_id}/applicationconsents/{application_id}
Note
レート制限は、各 applicationId (CPV パートナーのアプリケーション ID) に対して 1 秒あたり 50 要求 (RPS) です。
URI パラメーター
| 名前 | / | 必須 | タイプ | 説明 |
|---|---|---|---|---|
| customer_id | path | True | string | パートナー センターで生成された顧客の ID |
| Application_id | path | True | string | CPV アプリケーションの ID |
要求ヘッダー
メディアの種類: application/json
| 名前 | Required | タイプ | 説明 |
|---|---|---|---|
| Authorization | True | string | 対象ユーザーのアクセス トークン https://api.partnercenter.microsoft.com |
| 同意する | True | string | 受け入れ可能なコンテンツ タイプ(通常は application/json 型) |
| ms-correlationid | string | 要求を内部的に追跡するために使用されます。 ms-correlationidが指定されていない場合、サーバーは要求ごとに新しいものを生成します |
|
| ms-requestid | string | 要求のべき等性に使用されます。 ms-requestid が指定されていない場合、サーバーは要求ごとに新しいものを生成します |
応答
| 名前 | 種類 | 説明 |
|---|---|---|
| 200 OK | 要求は成功しました。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 201 Created | アプリケーションの同意が削除されます。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 400 Bad Request | 入力が見つからないか無効でした。 応答本文には、エラーの詳細が含まれています。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 401 権限がありません | 要求が認証されませんでした。 クライアントは、有効な対象ユーザーに対して有効なアクセス トークンを渡す必要があります。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 403 無効 | 要求は認証されましたが、呼び出し元にそれを呼び出す権限がないため、拒否されました。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 404 見つかりません | リソースが見つからないか、指定された入力パラメーターで使用できません。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |
|
| 500 内部サーバー エラー | パートナー API サービスまたはその依存関係の 1 つが要求を満たできませんでした。 呼び出し元は要求を再試行できます。 メディアの種類: application/json、 application/xml、 text/xml、 text/json |