共用方式為


確認間接轉銷商的 Microsoft 合作夥伴合約簽署狀態

適用於:合作夥伴中心 |美國政府適用的 Microsoft Cloud 合作夥伴中心

您可以使用其 PartnerID (PGA/PLA) 或 雲端解決方案提供者 (CSP) 租使用者識別碼 (Microsoft ID) 來確認間接轉銷商是否已簽署 Microsoft 合作夥伴合約。 您可以使用其中一個識別碼,透過 AgreementStatus API 來查看 Microsoft 合作夥伴合約簽署狀態。

必要條件

  • 認證,如合作夥伴中心驗證所述。 此案例僅支援使用「應用程式+使用者」認證來進行驗證。

  • 間接轉銷商的 PartnerID (PGA/PLA) 或 CSP 租使用者識別碼 (Microsoft ID) 。 您必須使用這兩個識別碼的其中一個。

C#

若要取得間接轉銷商的 Microsoft 合作夥伴合約簽署狀態:

  1. 使用您的 IAggregatePartner.Compliance 集合呼叫 AgreementSignatureStatus 屬性。

  2. 呼叫 Get()GetAsync() 方法。

// IAggregatePartner partnerOperations;

var agreementSignatureStatusByMpnId = partnerOperations.Compliance.AgreementSignatureStatus.Get(mpnId:"Enter MPN Id (PGA/PLA)");

var agreementSignatureStatusByTenantId = partnerOperations.Compliance.AgreementSignatureStatus.Get(tenantId: "Enter Tenant Id");

REST 要求

要求語法

方法 要求 URI
GET {baseURL}/v1/compliance/{ProgramName}/agreementstatus?mpnId={MpnId}&tenantId={TenantId}

URI 參數

您必須提供下列兩個查詢參數的其中一個,才能識別合作夥伴。 如果您未提供這兩個查詢參數的其中一個,則會收到 400 (不正確的要求) 錯誤。

名稱 類型​​ 必要 描述
MpnId int No 識別間接轉銷商的 PartnerID (PGA/PLA)。
TenantId GUID No 識別間接轉銷商 CSP 帳戶的 Microsoft 識別碼。

要求標頭

如需詳細資訊,請參閱合作夥伴中心 REST

要求範例

使用 PartnerID 要求 (PGA/PLA)

下列範例要求會使用間接轉銷商的 PartnerID 取得間接轉銷商的 Microsoft 合作夥伴合約 簽署狀態。

GET https://api.partnercenter.microsoft.com/v1/compliance/csp/agreementstatus?mpnid=1234567 HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6
X-Locale: en-US
Host: api.partnercenter.microsoft.com

使用 CSP 租用戶識別碼的要求

下列要求範例會使用間接轉銷商的 CSP 租用戶識別碼 (Microsoft 識別碼),取得間接轉銷商的 Microsoft 合作夥伴合約簽署狀態。

GET https://api.partnercenter.microsoft.com/v1/compliance/csp/agreementstatus?tenantId=a2898e3a-06ca-454e-a0d0-c73b0ee36bba HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6
X-Locale: en-US
Host: api.partnercenter.microsoft.com

REST 回應

回應成功和錯誤碼

每個回應都隨附 HTTP 狀態碼,會指出成功與否以及其他的偵錯資訊。 請使用網路追蹤工具來讀取此錯誤碼、錯誤類型和其他參數。 如需完整清單,請參閱合作夥伴中心 REST 錯誤

回應範例 (成功)

下列回應範例會成功傳回間接轉銷商是否已簽署 Microsoft 合作夥伴合約。

HTTP/1.1 200 OK
Content-Length: 29
Content-Type: application/json; charset=utf-8
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb
MS-CV: jn3r+1wpE06nCt/0.0
MS-ServerId: 0000005B
Date: Tue, 15 Oct 2019 12:44:34 GMT
Connection: close
{
    "isAgreementSigned": true
}

回應範例 (失敗)

當無法傳回間接轉銷商 Microsoft 合作夥伴合約 的簽署狀態時,您可能會收到類似下列範例的回應。

非 GUID 格式的 CSP 租用戶識別碼

當您傳遞至 API 的 CSP 租用戶識別碼不是 GUID 時,會傳回下列回應範例。

HTTP/1.1 400 Bad Request
Content-Length: 105
Content-Type: application/json; charset=utf-8
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb
MS-CV: rbuZl5lbAkyq8WGK.0
MS-ServerId: 00000055
Date: Wed, 16 Oct 2019 08:55:23 GMT
Connection: close
{
    "code": 2000,
    "description": "Tenant Id must be a GUID.",
    "data": [],
    "source": "PartnerApiServiceControllers"
}

非數值 PartnerID

當您傳遞給 API 的 PartnerID (PGA/PLA) 非數值時,會傳回下列範例回應。

HTTP/1.1 400 Bad Request
Content-Length: 103
Content-Type: application/json; charset=utf-8
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb
MS-CV: cP5JiS4sv0GJxlJ9.0
MS-ServerId: 0000005B
Date: Wed, 16 Oct 2019 08:58:45 GMT
Connection: close
{
    "code": 2000,
    "description": "MPN Id must be numeric.",
    "data": [],
    "source": "PartnerApiServiceControllers"
}

沒有 PartnerID 或 CSP 租使用者標識碼

當您尚未將 PartnerID (PGA/PLA) 或 CSP 租使用者識別碼傳遞至 API 時,會傳回下列範例回應。 您必須將這兩個識別碼類型的其中一個傳遞給 API。

HTTP/1.1 400 Bad Request
Content-Length: 114
Content-Type: application/json; charset=utf-8
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb
MS-CV: hEV736v4qk6joDMR.0
MS-ServerId: 00000055
Date: Wed, 16 Oct 2019 09:00:30 GMT
Connection: close
{
    "code": 2001,
    "description": "Both MPN Id and Tenant Id cannot be empty.",
    "data": [],
    "source": "ComplianceController"
}

已傳遞 PartnerID 和 CSP 租使用者標識碼

當您將 PartnerID (PGA/PLA) 和 CSP 租使用者識別碼傳遞至 API 時,會傳回下列範例回應。 您只能將兩個識別碼類型的「其中一個」傳遞給 API。

HTTP/1.1 400 Bad Request
Content-Length: 119
Content-Type: application/json; charset=utf-8
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb
MS-CV: WTsLWK5UlUW9sZjH.0
MS-ServerId: 0000005B
Date: Wed, 16 Oct 2019 09:02:30 GMT
Connection: close
{
    "code": 2000,
    "description": "Both MPN Id and Tenant Id should not be passed.",
    "data": [],
    "source": "ComplianceController"
}

CSP 間接轉銷商合作夥伴標識碼 (PGA/PLA) 無效或未從合作夥伴成員資格中心移轉至合作夥伴中心

當傳遞的間接轉銷商 PartnerID (PGA/PLA) 無效或未從合作夥伴成員資格中心移轉至合作夥伴中心時,就會傳回下列範例回應。 深入瞭解

HTTP/1.1 400 Bad Request 
Content-Length: 321 
Content-Type: application/json; charset=utf-8 
MS-CorrelationId: 9240230a-413f-4880-acbd-96d59a165474 
MS-RequestId: 92caacb1-8c9e-49af-8f85-83f271c85056 
MS-CV: V8eVMXvaBE6LHyq6.0 
MS-ServerId: 0000005B 
Date: Fri, 24 Jul 2020 11:56:46 GMT 
Connection: close 

{ 
    "code": 2200, 
    "description": "Requested MPN Id 123456 is either invalid or does not exist in Partner Center.", 
    "data": [ 

        "https://partner.microsoft.com/resources/detail/migrate-pmc-pc-mpa-guide-pptx" 
    ], 
    "source": "PartnerFD" 
} 

CSP 間接提供者區域和 CSP 間接轉銷商區域不符

當間接轉銷商 PartnerID 的區域 (PGA/PLA) 與間接提供者的區域不符時,會傳回下列範例回應。 若要深入瞭解,請參閱 CSP 區域

HTTP/1.1 400 Bad Request 
Content-Length: 119 
Content-Type: application/json; charset=utf-8 
MS-CorrelationId: b4e67a78-0692-45d1-b408-04b9178a8ac6 
MS-RequestId: aa04fb9d-c6b6-4754-8a6a-86e00cdd5ccb 
MS-CV: WTsLWK5UlUW9sZjH.0 
MS-ServerId: 0000005B 
Date: Wed, 16 Oct 2019 09:02:30 GMT 
Connection: close 

{ 
    "code": 2201, 
    "description": "The CSP region of the requested PartnerID 123456 is India and doesn't match the CSP region United States of Indirect Provider with Tenant id a2898e3a-06ca-454e-a0d0-c73b0ee36bba.", 
    "data": [ 

        "https://learn.microsoft.com/partner-center/mpa-indirect-provider-faq"  
    ], 
    "source": "PartnerFD" 
} 

CSP 間接轉銷商帳戶存在於合作夥伴中心,但尚未簽署 MPA

當合作夥伴中心內的 CSP 間接轉銷商帳戶尚未簽署 MPA 時,會傳回下列範例回應。 若要深入瞭解,請參閱 間接提供者常見問題

HTTP/1.1 400 Bad Request
Content-Length: 321
Content-Type: application/json; charset=utf-8
MS-CorrelationId: 9240230a-413f-4880-acbd-96d59a165474
MS-RequestId: 92caacb1-8c9e-49af-8f85-83f271c85056
MS-CV: V8eVMXvaBE6LHyq6.0
MS-ServerId: 0000005B
Date: Fri, 24 Jul 2020 11:56:46 GMT
Connection: close
{
    "code": 2203,
    "description": "MPN Id 123456 has not signed Microsoft Partner Agreement (MPA) for the CSP region where the order is being placed. Please advise your reseller to sign MPA to continue with the order.",
    "data": [
        "https://learn.microsoft.com/partner-center/mpa-indirect-provider-faq"
    ],
    "source": "PartnerFD"
}

沒有 CSP 間接轉銷商帳戶與指定的 PartnerID 相關聯

當合作夥伴中心可以辨識傳入要求的 PartnerID (PGA/PLA),但沒有與指定 PartnerID (PGA/PLA) 相關聯的 CSP 註冊時,會傳回下列範例回應。 若要深入瞭解,請參閱 間接提供者常見問題

HTTP/1.1 400 Bad Request 
Content-Length: 321 
Content-Type: application/json; charset=utf-8 
MS-CorrelationId: 9240230a-413f-4880-acbd-96d59a165474 
MS-RequestId: 92caacb1-8c9e-49af-8f85-83f271c85056 
MS-CV: V8eVMXvaBE6LHyq6.0 
MS-ServerId: 0000005B
Date: Fri, 24 Jul 2020 11:56:46 GMT 
Connection: close 

{ 
    "code": 2204, 
    "description": "Requested MPN Id 123456 is not associated with any CSP Indirect Reseller account in Partner Center. Please advise your reseller to enroll into the CSP program as an indirect reseller in Partner Center to be compliant.", 
    "data": [ 

        "https://learn.microsoft.com/partner-center/mpa-indirect-provider-faq" 
    ], 
    "source": "PartnerFD" 
} 

無效的租用戶識別碼

當合作夥伴中心找不到任何與要求中傳遞的租用戶識別碼相關聯的帳戶時,就會傳回下列範例回應。

HTTP/1.1 400 Bad Request 
Content-Length: 321 
Content-Type: application/json; charset=utf-8 
MS-CorrelationId: 9240230a-413f-4880-acbd-96d59a165474 
MS-RequestId: 92caacb1-8c9e-49af-8f85-83f271c85056 
MS-CV: V8eVMXvaBE6LHyq6.0 
MS-ServerId: 0000005B 
Date: Fri, 24 Jul 2020 11:56:46 GMT 

Connection: close 
{ 
    "code": 2205, 
    "description": "Could not find account with id '12345678-ACBD-1234-ABCD-123456789ABC'.", 
    "data": [], 
    "source": "PartnerFD" 
} 

找不到具有指定租用戶識別碼的 MPA

當合作夥伴中心找不到任何具有指定租用戶識別碼的 MPA 簽章時,就會傳回下列範例回應。 若要深入瞭解,請參閱 間接提供者常見問題

HTTP/1.1 400 Bad Request
Content-Length: 321
Content-Type: application/json; charset=utf-8
MS-CorrelationId: 9240230a-413f-4880-acbd-96d59a165474
MS-RequestId: 92caacb1-8c9e-49af-8f85-83f271c85056
MS-CV: V8eVMXvaBE6LHyq6.0
MS-ServerId: 0000005B
Date: Fri, 24 Jul 2020 11:56:46 GMT
Connection: close
{
    "code": 2206,
    "description": "Parnter Center Account associated to Tenant Id 12345678-ACBD-1234-ABCD-123456789ABC hasn't signed the agreement",
    "data": [
        "https://learn.microsoft.com/partner-center/mpa-indirect-provider-faq"
    ],
    "source": "PartnerFD"
}