Verificar o status de assinatura de um Contrato de Parceiro da Microsoft de um revendedor indiretoVerify an indirect reseller's Microsoft Partner Agreement signing status

Aplica-se a:Applies to:

  • Partner CenterPartner Center
  • Partner Center do Microsoft Cloud for US GovernmentPartner Center for Microsoft Cloud for US Government

Você pode verificar se um revendedor indireto assinou o Contrato de Parceiro da Microsoft usando sua ID do MPN (Microsoft Partner Network) ou a ID de locatário (ID da Microsoft) do CSP (Provedor de Soluções na Nuvem).You can verify whether an indirect reseller has signed the Microsoft Partner Agreement using their Microsoft Partner Network (MPN) ID or Cloud Solution Provider (CSP) tenant ID (Microsoft ID). Você pode usar um desses identificadores para verificar o status de assinatura do Contrato de Parceiro da Microsoft usando a API AgreementStatus .You can use one of these identifiers to check the Microsoft Partner Agreement signing status using the AgreementStatus API.

Pré-requisitosPrerequisites

  • Credenciais, conforme descrito em Autenticação do Partner Center.Credentials as described in Partner Center authentication. Este cenário dá suporte somente à autenticação com credenciais de aplicativo + de usuário.This scenario supports authentication with App+User credentials only.

  • A ID do MPN ou a ID do locatário do CSP (ID da Microsoft) do revendedor indireto.The MPN ID or the CSP tenant ID (Microsoft ID) of the indirect reseller. Você precisa usar um desses dois identificadores.You must use one of these two identifiers.

C#C#

Para obter o status de assinatura do Contrato de Parceiro da Microsoft de um revendedor indireto:To get the Microsoft Partner Agreement signature status of an indirect reseller:

  1. Use a coleção IAggregatePartner.Compliance para chamar a propriedade AgreementSignatureStatus .Use your IAggregatePartner.Compliance collection to call the AgreementSignatureStatus property.

  2. Chame o método Get() ou GetAsync().Call the Get() or GetAsync() method.

// IAggregatePartner partnerOperations;

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

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

Solicitação RESTREST request

Sintaxe da solicitaçãoRequest syntax

MétodoMethod URI da solicitaçãoRequest URI
GETGET {baseURL} /v1/compliance/{ProgramName}/agreementstatus?mpnId={MpnId}&tenantId={TenantId}{baseURL} /v1/compliance/{ProgramName}/agreementstatus?mpnId={MpnId}&tenantId={TenantId}

Parâmetros do URIURI parameters

Você precisa fornecer um dos dois parâmetros de consulta a seguir para identificar o parceiro.You must provide one of the following two query parameters to identify the partner. Se você não fornecer um desses dois parâmetros de consulta, receberá um erro 400 (Erro na solicitação) .If you don't provide one of these two query parameters, you will receive a 400 (Bad request) error.

NomeName TipoType NecessáriaRequired DescriçãoDescription
MpnIdMpnId intint NãoNo Uma ID do Microsoft Partner Network que identifica o revendedor indireto.A Microsoft Partner Network ID that identifies the indirect reseller.
TenantIdTenantId GUIDGUID NãoNo Uma ID da Microsoft que identifica a conta do CSP o revendedor indireto.A Microsoft ID that identifies the CSP account of the indirect reseller.

Cabeçalhos de solicitaçãoRequest headers

Para obter mais informações, confira REST do Partner Center.For more information, see Partner Center REST.

Exemplos de solicitaçãoRequest examples

Solicitação usando a ID do MPNRequest using MPN ID

A solicitação de exemplo a seguir obtém o status de assinatura do Contrato de Parceiro da Microsoft do revendedor indireto usando a ID do Microsoft Partner Network do revendedor indireto.The following example request gets the indirect reseller's Microsoft Partner Agreement signing status using the indirect reseller's Microsoft Partner Network ID.

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

Solicitação usando a ID do locatário do CSPRequest using CSP tenant ID

A solicitação de exemplo a seguir obtém o status de assinatura do Contrato de Parceiro da Microsoft do revendedor indireto usando a ID do locatário do CSP (ID da Microsoft).The following example request gets the indirect reseller's Microsoft Partner Agreement signing status using the indirect reseller's CSP tenant ID (Microsoft ID).

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

Resposta RESTREST response

Códigos de êxito e de erro de respostaResponse success and error codes

Cada resposta vem com um código de status HTTP que indica êxito ou falha e informações de depuração adicionais.Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use uma ferramenta de rastreamento de rede para ler esse código, o tipo de erro e os parâmetros adicionais.Use a network trace tool to read this code, error type, and additional parameters. Para obter a lista completa, confira Erros do REST do Partner Center.For the full list, see Partner Center REST error.

Exemplo de resposta (êxito)Response example (success)

A resposta de exemplo a seguir retorna com êxito se o revendedor indireto assinou ou não o Contrato de Parceiro da Microsoft.The following example response successfully returns whether the indirect reseller has signed the Microsoft Partner Agreement.

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
}

Exemplos de resposta (falha)Response examples (failure)

Você poderá receber respostas semelhantes aos exemplos a seguir quando o status de assinatura do Contrato de Parceiro da Microsoft do revendedor indireto não puder ser retornado.You may receive responses similar to the following examples when the signing status of the indirect reseller's Microsoft Partner Agreement can't be returned.

ID de locatário do CSP formatada para não GUIDNon-GUID formatted CSP tenant ID

A resposta de exemplo a seguir é retornada quando a ID do locatário do CSP que você passou para a API não é um GUID.The following example response is returned when the CSP tenant ID that you passed to the API isn't a 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"
}

ID do MPN não numéricaNon-numeric MPN ID

A resposta de exemplo a seguir é retornada quando a ID do MPN que você passou para a API não é numérica.The following example response is returned when the MPN ID that you passed to the API is non-numeric.

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"
}

Nenhuma ID do MPN ou ID do locatário do CSPNo MPN ID or CSP tenant ID

A resposta de exemplo a seguir é retornada quando você não passou uma ID do MPN ou ID do locatário do CSP para a API.The following example response is returned when you haven't passed an MPN ID or CSP tenant ID to the API. Você precisa passar um dos dois tipos de ID para a API.You must pass one of the two ID types to the 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"
}

A ID do MPN e a ID do locatário do CSP foram passadasBoth MPN ID and CSP tenant ID passed

A resposta de exemplo a seguir é retornada quando você passa a ID do MPN e a ID do locatário do CSP para a API.The following example response is returned when you pass both the MPN ID and CSP tenant ID to the API. Você precisa passar somente um dos dois tipos de identificador para a API.You must pass only one of the two identifier types to the 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"
}

A ID do MPN do CSP Indirect Reseller é inválida ou não foi migrada do Partner Membership Center para o Partner CenterCSP Indirect Reseller MPN Id is either invalid or not migrated from Partner Membership Center to Partner Center

A resposta de exemplo a seguir será retornada quando a ID do MPN do Indirect Reseller passada for inválida ou não tiver sido migrada do Partner Membership Center para o Partner Center.The following example response is returned when Indirect reseller MPN ID passed is either invalid or it is not migrated from Partner Membership Center to Partner Center. Saiba maisLearn More

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": "MPN Id 123456 is either invalid or not yet migrated to Partner Center. Please advise your reseller to migrate the reseller MPN ID to Partner Center to continue with this order.",
    "data": [
        "https://partner.microsoft.com/en-us/resources/detail/migrate-pmc-pc-mpa-guide-pptx"
    ],
    "source": "PartnerFD"
}

A região do CSP Indirect Provider e a região do CSP Indirect Reseller não correspondemCSP Indirect Provider region and CSP Indirect Reseller region does not match

A seguinte resposta de exemplo será retornada quando a região da ID do MPN do Indirect Reseller não corresponder à região do Indirect Provider.The following example response is returned when region of Indirect reseller MPN ID doesn't match with region of the Indirect Provider. Saiba mais sobre as Regiões do CSP.Learn more about CSP Regions.

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 MPN ID 1234567 doesn’t match the CSP region from where you are placing the order. Provide the MPN ID for the CSP region where you are placing the order.",
    "data": [
        "https://docs.microsoft.com/en-us/partner-center/regional-authorization-overview" 
    ],
    "source": "PartnerFD"
}

A conta do CSP Indirect Reseller existe no Partner Center, mas não assinou o MPACSP Indirect Reseller account exists in Partner Center but hasn't signed the MPA

A resposta de exemplo a seguir será retornada quando a conta do CSP Indirect Reseller no Partner Center não tiver assinado o MPA.The following example response is returned when CSP Indirect Reseller account in Partner Center hasn't signed the MPA. Saiba maisLearn More

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://partner.microsoft.com/en-gb/resources/detail/verify-mpa-acceptance-status-pptx"
    ],
    "source": "PartnerFD"
}

Nenhuma conta do CSP Indirect Reseller está associada à ID do MPN fornecidaNo CSP Indirect Reseller account is associated with the given MPN ID

A resposta de exemplo a seguir será retornada quando o Partner Center reconhecer a ID do MPN passada na solicitação, mas não houver nenhum registro de CSP associado à ID do MPN fornecida.The following example response is returned when Partner Center can recognize the MPN ID passed in the request but there is no CSP enrollment associated to the given MPN ID. Saiba maisLearn More

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": "MPN Id 123456 is not associated with a CSP Indirect Reseller account in Partner Center. Please advise your reseller to enroll into the CSP program as an indirect reseller in Partner Center.",
    "data": [
        "https://partner.microsoft.com/en-us/resources/detail/onboard-pc-csp-mpn-mpa-guide-pptx"
    ],
    "source": "PartnerFD"
}

ID de locatário inválidaInvalid Tenant ID

A resposta de exemplo a seguir será retornada quando o Partner Center não localizar nenhuma conta associada à ID de locatário passada na solicitação.The following example response is returned when Partner Center doesn't find any account associated to the Tenant ID passed in the request.

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": "Partner Center doesn't find any account associated to the Tenant ID 12345678-ACBD-1234-ABCD-123456789ABC",
    "data": [],
    "source": "PartnerFD"
}

Nenhum MPA foi encontrado com a ID de locatário fornecidaNo MPA found with the given Tenant ID

A resposta de exemplo a seguir será retornada quando o Partner Center não conseguir encontrar nenhuma assinatura do MPA com a ID de locatário fornecida.The following example response is returned when Partner Center can't find any MPA signature with the given Tenant ID.

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": [],
    "source": "PartnerFD"
}