Criar managedDeviceCertificateStateCreate managedDeviceCertificateState

Namespace: microsoft.graphNamespace: microsoft.graph

Importante: As APIs do Microsoft Graph na versão /beta estão sujeitas a alterações; não há suporte para uso de produção.Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

Observação: A API do Microsoft Graph para Intune requer uma licença ativa do Intune para o locatário.Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Crie um novo objeto managedDeviceCertificateState.Create a new managedDeviceCertificateState object.

Pré-requisitosPrerequisites

Uma das seguintes permissões é obrigatória para chamar esta API. Para saber mais, incluindo como escolher permissões, confira Permissões.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Tipo de permissãoPermission type Permissões (da com menos para a com mais privilégios)Permissions (from least to most privileged)
Delegada (conta corporativa ou de estudante)Delegated (work or school account) DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All
Delegada (conta pessoal da Microsoft)Delegated (personal Microsoft account) Sem suporte.Not supported.
AplicativoApplication DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All

Solicitação HTTPHTTP Request

POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.iosPkcsCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.iosScepCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidPkcsCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidScepCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.iosImportedPFXCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidImportedPFXCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidDeviceOwnerPkcsCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidDeviceOwnerScepCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidWorkProfilePkcsCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidWorkProfileScepCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidForWorkImportedPFXCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.androidDeviceOwnerImportedPFXCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/identityCertificate/microsoft.graph.androidForWorkPkcsCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/identityCertificate/microsoft.graph.androidForWorkScepCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.windowsPhone81VpnConfiguration/identityCertificate/microsoft.graph.windowsPhone81SCEPCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.macOSWiredNetworkConfiguration/identityCertificateForClientAuthentication/microsoft.graph.macOSPkcsCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.macOSWiredNetworkConfiguration/identityCertificateForClientAuthentication/microsoft.graph.macOSScepCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.macOSWiredNetworkConfiguration/identityCertificateForClientAuthentication/microsoft.graph.macOSImportedPFXCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.windowsWifiEnterpriseEAPConfiguration/identityCertificateForClientAuthentication/microsoft.graph.windows10PkcsCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.windowsWifiEnterpriseEAPConfiguration/identityCertificateForClientAuthentication/microsoft.graph.windows81SCEPCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.windowsWifiEnterpriseEAPConfiguration/identityCertificateForClientAuthentication/microsoft.graph.windows10ImportedPFXCertificateProfile/managedDeviceCertificateStates
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.windowsWifiEnterpriseEAPConfiguration/identityCertificateForClientAuthentication/microsoft.graph.windowsPhone81ImportedPFXCertificateProfile/managedDeviceCertificateStates

Cabeçalhos de solicitaçãoRequest headers

CabeçalhoHeader ValorValue
AutorizaçãoAuthorization <Token> de portador obrigatório.Bearer <token> Required.
AceitarAccept application/jsonapplication/json

Corpo da solicitaçãoRequest body

No corpo da solicitação, fornece uma representação JSON para o objeto managedDeviceCertificateState.In the request body, supply a JSON representation for the managedDeviceCertificateState object.

A tabela a seguir mostra as propriedades que são necessárias ao criar managedDeviceCertificateState.The following table shows the properties that are required when you create the managedDeviceCertificateState.

PropriedadeProperty TipoType DescriçãoDescription
idid Cadeia de caracteresString Chave da entidade.Key of the entity.
devicePlatformdevicePlatform devicePlatformTypedevicePlatformType Plataforma do dispositivo.Device platform. Os valores possíveis são: android, androidForWork, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile, unknown.Possible values are: android, androidForWork, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile, unknown.
certificateKeyUsagecertificateKeyUsage keyUsageskeyUsages Uso de chave.Key usage. Os valores possíveis são: keyEncipherment e digitalSignature.Possible values are: keyEncipherment, digitalSignature.
certificateValidityPeriodUnitscertificateValidityPeriodUnits certificateValidityPeriodScalecertificateValidityPeriodScale Unidades de período de validade.Validity period units. Os valores possíveis são: days, months, years.Possible values are: days, months, years.
certificateIssuanceStatecertificateIssuanceState certificateIssuanceStatescertificateIssuanceStates Estado de emissão.Issuance State. Os valores possíveis são: unknown , , , , , , , , challengeIssued challengeIssueFailed , requestCreationFailed requestSubmitFailed , challengeValidationSucceeded challengeValidationFailed issueFailed issuePending issued responseProcessingFailed responsePending enrollmentSucceeded enrollmentNotNeeded revoked , removedFromCollection renewVerified installFailed installed deleteFailed deleted renewalRequested requestedPossible values are: unknown, challengeIssued, challengeIssueFailed, requestCreationFailed, requestSubmitFailed, challengeValidationSucceeded, challengeValidationFailed, issueFailed, issuePending, issued, responseProcessingFailed, responsePending, enrollmentSucceeded, enrollmentNotNeeded, revoked, removedFromCollection, renewVerified, installFailed, installed, deleteFailed, deleted, renewalRequested, requested.
certificateKeyStorageProvidercertificateKeyStorageProvider keyStorageProviderOptionkeyStorageProviderOption Provedor de Armazenamento de Chaves.Key Storage Provider. Os valores possíveis são: useTpmKspOtherwiseUseSoftwareKsp, useTpmKspOtherwiseFail, usePassportForWorkKspOtherwiseFail, useSoftwareKsp.Possible values are: useTpmKspOtherwiseUseSoftwareKsp, useTpmKspOtherwiseFail, usePassportForWorkKspOtherwiseFail, useSoftwareKsp.
certificateSubjectNameFormatcertificateSubjectNameFormat subjectNameFormatsubjectNameFormat Formato de nome do assunto.Subject name format. Os valores possíveis são: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId.Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId.
certificateSubjectAlternativeNameFormatcertificateSubjectAlternativeNameFormat subjectAlternativeNameTypesubjectAlternativeNameType Formato de nome alternativo do assunto.Subject alternative name format. Os possíveis valores são: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier.Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier.
certificateRevokeStatuscertificateRevokeStatus certificateRevocationStatuscertificateRevocationStatus Revogar status.Revoke status. Os valores possíveis são: none, pending, issued, failed, revoked.Possible values are: none, pending, issued, failed, revoked.
certificateProfileDisplayNamecertificateProfileDisplayName Cadeia de caracteresString Nome de exibição de perfil de certificadoCertificate profile display name
deviceDisplayNamedeviceDisplayName Cadeia de caracteresString Nome de exibição do dispositivoDevice display name
userDisplayNameuserDisplayName Cadeia de caracteresString Nome de exibição do usuárioUser display name
certificateExpirationDateTimecertificateExpirationDateTime DateTimeOffsetDateTimeOffset Data de expiração do certificadoCertificate expiry date
certificateLastIssuanceStateChangedDateTimecertificateLastIssuanceStateChangedDateTime DateTimeOffsetDateTimeOffset Última alteração de estado de emissão de certificadoLast certificate issuance state change
lastCertificateStateChangeDateTimelastCertificateStateChangeDateTime DateTimeOffsetDateTimeOffset Última alteração de estado de emissão de certificadoLast certificate issuance state change
certificateIssuercertificateIssuer Cadeia de caracteresString EmissorIssuer
certificateThumbprintcertificateThumbprint Cadeia de caracteresString Impressão DigitalThumbprint
certificateSerialNumbercertificateSerialNumber Cadeia de caracteresString Número de sérieSerial number
certificateKeyLengthcertificateKeyLength Int32Int32 Comprimento de chaveKey length
certificateEnhancedKeyUsagecertificateEnhancedKeyUsage Cadeia de caracteresString Uso estendido de chaveExtended key usage
certificateValidityPeriodcertificateValidityPeriod Int32Int32 Período de validadeValidity period
certificateSubjectNameFormatStringcertificateSubjectNameFormatString Cadeia de caracteresString Cadeia de caracteres de formato de nome de assunto para formatos de nome de assunto personalizadosSubject name format string for custom subject name formats
certificateSubjectAlternativeNameFormatStringcertificateSubjectAlternativeNameFormatString Cadeia de caracteresString Cadeia de caracteres de formato de nome alternativo de assunto para formatos personalizadosSubject alternative name format string for custom formats
certificateIssuanceDateTimecertificateIssuanceDateTime DateTimeOffsetDateTimeOffset Data de emissãoIssuance date
certificateErrorCodecertificateErrorCode Int32Int32 Código de erroError code

RespostaResponse

Se tiver êxito, este método retornará um código de resposta e um 201 Created objeto managedDeviceCertificateState no corpo da resposta.If successful, this method returns a 201 Created response code and a managedDeviceCertificateState object in the response body.

ExemploExample

SolicitaçãoRequest

Este é um exemplo da solicitação.Here is an example of the request.

POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.iosPkcsCertificateProfile/managedDeviceCertificateStates
Content-type: application/json
Content-length: 1517

{
  "@odata.type": "#microsoft.graph.managedDeviceCertificateState",
  "devicePlatform": "androidForWork",
  "certificateKeyUsage": "digitalSignature",
  "certificateValidityPeriodUnits": "months",
  "certificateIssuanceState": "challengeIssued",
  "certificateKeyStorageProvider": "useTpmKspOtherwiseFail",
  "certificateSubjectNameFormat": "commonNameIncludingEmail",
  "certificateSubjectAlternativeNameFormat": "emailAddress",
  "certificateRevokeStatus": "pending",
  "certificateProfileDisplayName": "Certificate Profile Display Name value",
  "deviceDisplayName": "Device Display Name value",
  "userDisplayName": "User Display Name value",
  "certificateExpirationDateTime": "2017-01-01T00:02:14.9489247-08:00",
  "certificateLastIssuanceStateChangedDateTime": "2017-01-01T00:00:27.7468732-08:00",
  "lastCertificateStateChangeDateTime": "2017-01-01T00:01:10.7144639-08:00",
  "certificateIssuer": "Certificate Issuer value",
  "certificateThumbprint": "Certificate Thumbprint value",
  "certificateSerialNumber": "Certificate Serial Number value",
  "certificateKeyLength": 4,
  "certificateEnhancedKeyUsage": "Certificate Enhanced Key Usage value",
  "certificateValidityPeriod": 9,
  "certificateSubjectNameFormatString": "Certificate Subject Name Format String value",
  "certificateSubjectAlternativeNameFormatString": "Certificate Subject Alternative Name Format String value",
  "certificateIssuanceDateTime": "2016-12-31T23:59:41.5044473-08:00",
  "certificateErrorCode": 4
}

RespostaResponse

Veja a seguir um exemplo da resposta. Observação: o objeto response mostrado aqui pode estar truncado por motivos de concisão. Todas as propriedades serão retornadas de uma chamada real.Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1566

{
  "@odata.type": "#microsoft.graph.managedDeviceCertificateState",
  "id": "d99bc884-c884-d99b-84c8-9bd984c89bd9",
  "devicePlatform": "androidForWork",
  "certificateKeyUsage": "digitalSignature",
  "certificateValidityPeriodUnits": "months",
  "certificateIssuanceState": "challengeIssued",
  "certificateKeyStorageProvider": "useTpmKspOtherwiseFail",
  "certificateSubjectNameFormat": "commonNameIncludingEmail",
  "certificateSubjectAlternativeNameFormat": "emailAddress",
  "certificateRevokeStatus": "pending",
  "certificateProfileDisplayName": "Certificate Profile Display Name value",
  "deviceDisplayName": "Device Display Name value",
  "userDisplayName": "User Display Name value",
  "certificateExpirationDateTime": "2017-01-01T00:02:14.9489247-08:00",
  "certificateLastIssuanceStateChangedDateTime": "2017-01-01T00:00:27.7468732-08:00",
  "lastCertificateStateChangeDateTime": "2017-01-01T00:01:10.7144639-08:00",
  "certificateIssuer": "Certificate Issuer value",
  "certificateThumbprint": "Certificate Thumbprint value",
  "certificateSerialNumber": "Certificate Serial Number value",
  "certificateKeyLength": 4,
  "certificateEnhancedKeyUsage": "Certificate Enhanced Key Usage value",
  "certificateValidityPeriod": 9,
  "certificateSubjectNameFormatString": "Certificate Subject Name Format String value",
  "certificateSubjectAlternativeNameFormatString": "Certificate Subject Alternative Name Format String value",
  "certificateIssuanceDateTime": "2016-12-31T23:59:41.5044473-08:00",
  "certificateErrorCode": 4
}