顧客の資格を非同期的に取得する
顧客の資格を非同期的に取得する方法。
前提条件
パートナー センターの認証に関するページで説明している資格情報。 このシナリオでは、スタンドアロンの App と App+User の両方の資格情報を使用した認証がサポートされています。
顧客 ID です (
customer-tenant-id
)。 顧客の ID がわからない場合は、[顧客] ワークスペースを選択し、顧客の一覧から顧客を選択し、[アカウント] を選択して、パートナー センターで検索できます。 顧客の [アカウント] ページで、[顧客アカウント情報] セクションで Microsoft ID を探します。 Microsoft ID は、顧客 ID (customer-tenant-id
) と同じです。
C#
顧客の資格を取得するには、顧客識別子を使用して IAggregatePartner.Customers.ById メソッドを呼び出します。 次に、Qualification プロパティを使用して ICustomerQualification インターフェイスを取得します。 最後に、顧客の資格を呼び出 GetQualifications()
すか GetQualificationsAsync()
取得します。
// IAggregatePartner partnerOperations;
// string customerId;
var customerQualifications = partnerOperations.Customers.ById(customerId).Qualification.GetQualifications();
サンプル: コンソール サンプル アプリ。 プロジェクト: SdkSamples クラス: GetCustomerQualifications.cs
REST 要求
要求の構文
認証方法 | 要求 URI |
---|---|
GET | {baseURL}/v1/customers/{customer-tenant-id}/qualifications HTTP/1.1 |
URI パラメーター
次の表に、すべての修飾を取得するために必要なクエリ パラメーターを示します。
名前 | タイプ | Required | 説明 |
---|---|---|---|
customer-tenant-id | string | はい | 顧客を識別する GUID 形式の文字列。 |
要求ヘッダー
詳細については、「パートナー センター REST ヘッダー」を参照してください。
要求本文
なし。
要求の例
GET https://api.partnercenter.microsoft.com/v1/customers/<customer-tenant-id>/qualifications HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-CorrelationId: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
REST 応答
成功した場合、このメソッドは応答本文で修飾のコレクションを返します。 Education 資格を持つ顧客に対する GET 呼び出しの例を次に示します。
応答の成功とエラーのコード
各応答には、成功または失敗を示す HTTP ステータス コードと、追加のデバッグ情報が付属しています。 このコード、エラーの種類、追加のパラメーターを読み取るには、ネットワーク トレース ツールを使用します。 完全な一覧については、パートナー センターの REST エラーコードに関する記事を参照してください。
応答例
Approved
HTTP/1.1 200 OK
Content-Length:
Content-Type: application/json
MS-CorrelationId: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
[
{
"qualification": "Education",
"vettingStatus": "Approved",
}
]
レビュー中
HTTP/1.1 200 OK
Content-Length:
Content-Type: application/json
MS-CorrelationId: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
[
{
"qualification": "Education",
"vettingStatus": "InReview",
"vettingCreatedDate": "2020-12-03T10:37:38.885Z" // UTC
}
]
拒否する
HTTP/1.1 200 OK
Content-Length:
Content-Type: application/json
MS-CorrelationId: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
[
{
"qualification": "Education",
"vettingStatus": "Denied",
"vettingReason": "Not an Education Customer", // example Vetting Reason
"vettingCreatedDate": "2020-12-03T10:37:38.885Z" // UTC
}
]
状態所有エンティティのサンプル
POST を使用した状態所有エンティティのサンプル
//SOE
POST {customer_id}/qualifications
{
"qualification": "StateOwnedEntity"
}
//
Get Qualifications を使用した状態所有エンティティのサンプル
//SOE:
GET {customer_id}/qualifications
[
{
"qualification": "StateOwnedEntity"
}
]
教育機関での資格取得による州所有エンティティ
GET {customer_id}/qualifications
[
{
"qualification": "Education",
"vettingStatus": "Approved"
},
{
"qualification": "StateOwnedEntity"
}
]
GCC で条件を取得して状態所有エンティティを取得する
GET {customer_id}/qualifications
[
{
"qualification": "GovernmentCommunityCloud",
"vettingStatus": "Approved",
"vettingCreateDate": "2021-05-06T19:59:56.6832021+00:00"
},
{
"qualification": "StateOwnedEntity"
}
]
関連記事
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示