Créer managedDeviceCertificateStateCreate managedDeviceCertificateState

Espace de noms: microsoft.graphNamespace: microsoft.graph

Important : Les API Microsoft Graph sous la version/beta peuvent faire l’objet de modifications ; l’utilisation de la production n’est pas prise en charge.Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

Remarque : l’API Microsoft Graph pour Intune requiert une licence Intune active pour le client.Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Crée un objet managedDeviceCertificateState .Create a new managedDeviceCertificateState object.

Conditions préalablesPrerequisites

L’une des autorisations suivantes est nécessaire pour appeler cette API. Pour plus d’informations, notamment sur la façon de choisir les autorisations, voir Autorisations.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Type d’autorisationPermission type Autorisations (par ordre décroissant du niveau de privilège)Permissions (from most to least privileged)
Déléguée (compte professionnel ou scolaire)Delegated (work or school account) DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All
Déléguée (compte Microsoft personnel)Delegated (personal Microsoft account) Non prise en charge.Not supported.
ApplicationApplication DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All

Requête 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

En-têtes de demandeRequest headers

En-têteHeader ValeurValue
AutorisationAuthorization Porteur <token> obligatoire.Bearer <token> Required.
AccepterAccept application/jsonapplication/json

Corps de la demandeRequest body

Dans le corps de la demande, fournissez une représentation JSON de l’objet managedDeviceCertificateState.In the request body, supply a JSON representation for the managedDeviceCertificateState object.

Le tableau suivant indique les propriétés qui sont requises lorsque vous créez le managedDeviceCertificateState.The following table shows the properties that are required when you create the managedDeviceCertificateState.

PropriétéProperty TypeType DescriptionDescription
idid ChaîneString Clé de l’entité.Key of the entity.
devicePlatformdevicePlatform devicePlatformTypedevicePlatformType Plateforme d’appareil.Device platform. Les valeurs possibles sont les suivantes : android, androidForWork, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile, unknown.Possible values are: android, androidForWork, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile, unknown.
certificateKeyUsagecertificateKeyUsage Utilisations de KeyUsagekeyUsages Utilisation de la clé.Key usage. Les valeurs possibles sont les suivantes : keyEncipherment, digitalSignature.Possible values are: keyEncipherment, digitalSignature.
certificateValidityPeriodUnitscertificateValidityPeriodUnits certificateValidityPeriodScalecertificateValidityPeriodScale Unités de période de validité.Validity period units. Les valeurs possibles sont days, months et years.Possible values are: days, months, years.
certificateIssuanceStatecertificateIssuanceState certificateIssuanceStatescertificateIssuanceStates État d’émission.Issuance State. Les valeurs possibles sont les suivantes :,,,,,,,,,,,,,,,,,,,,, unknown challengeIssued challengeIssueFailed requestCreationFailed requestSubmitFailed challengeValidationSucceeded challengeValidationFailed issueFailed issuePending issued responseProcessingFailed responsePending enrollmentSucceeded enrollmentNotNeeded revoked removedFromCollection renewVerified installFailed installed deleteFailed deleted renewalRequested et requested .Possible 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 Fournisseur de stockage de clés.Key Storage Provider. Les valeurs possibles sont les suivantes : useTpmKspOtherwiseUseSoftwareKsp, useTpmKspOtherwiseFail, usePassportForWorkKspOtherwiseFail, useSoftwareKsp.Possible values are: useTpmKspOtherwiseUseSoftwareKsp, useTpmKspOtherwiseFail, usePassportForWorkKspOtherwiseFail, useSoftwareKsp.
certificateSubjectNameFormatcertificateSubjectNameFormat subjectNameFormatsubjectNameFormat Format du nom de sujet.Subject name format. Les valeurs possibles sont les suivantes : commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId.Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId.
certificateSubjectAlternativeNameFormatcertificateSubjectAlternativeNameFormat subjectAlternativeNameTypesubjectAlternativeNameType Format autre nom du sujet.Subject alternative name format. Les valeurs possibles sont les suivantes : none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService.Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService.
certificateRevokeStatuscertificateRevokeStatus certificateRevocationStatuscertificateRevocationStatus Révoquer l’État.Revoke status. Les valeurs possibles sont les suivantes : none, pending, issued, failed, revoked.Possible values are: none, pending, issued, failed, revoked.
certificateProfileDisplayNamecertificateProfileDisplayName ChaîneString Nom d’affichage du profil de certificatCertificate profile display name
deviceDisplayNamedeviceDisplayName StringString Nom complet de l’appareilDevice display name
userDisplayNameuserDisplayName StringString Nom complet d’utilisateurUser display name
certificateExpirationDateTimecertificateExpirationDateTime DateTimeOffsetDateTimeOffset Date d’expiration du certificatCertificate expiry date
certificateLastIssuanceStateChangedDateTimecertificateLastIssuanceStateChangedDateTime DateTimeOffsetDateTimeOffset Dernier changement d’état d’émission de certificatLast certificate issuance state change
lastCertificateStateChangeDateTimelastCertificateStateChangeDateTime DateTimeOffsetDateTimeOffset Dernier changement d’état d’émission de certificatLast certificate issuance state change
certificateIssuercertificateIssuer ChaîneString IssuerIssuer
certificateThumbprintcertificateThumbprint ChaîneString PourvuThumbprint
certificateSerialNumbercertificateSerialNumber ChaîneString Numéro de sérieSerial number
certificateKeyLengthcertificateKeyLength Int32Int32 Longueur de cléKey length
certificateEnhancedKeyUsagecertificateEnhancedKeyUsage ChaîneString Utilisation de la clé étendueExtended key usage
certificateValidityPeriodcertificateValidityPeriod Int32Int32 Période de validitéValidity period
certificateSubjectNameFormatStringcertificateSubjectNameFormatString ChaîneString Chaîne de format de nom d’objet pour les formats de nom de sujet personnaliséSubject name format string for custom subject name formats
certificateSubjectAlternativeNameFormatStringcertificateSubjectAlternativeNameFormatString ChaîneString Chaîne de format de l’autre nom du sujet pour les formats personnalisésSubject alternative name format string for custom formats
certificateIssuanceDateTimecertificateIssuanceDateTime DateTimeOffsetDateTimeOffset Date d’émissionIssuance date
certificateErrorCodecertificateErrorCode Int32Int32 Code d'erreurError code

RéponseResponse

Si elle réussit, cette méthode renvoie un 201 Created Code de réponse et un objet managedDeviceCertificateState dans le corps de la réponse.If successful, this method returns a 201 Created response code and a managedDeviceCertificateState object in the response body.

ExempleExample

DemandeRequest

Voici un exemple de demande.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
}

RéponseResponse

Voici un exemple de la réponse. Remarque : L’objet de réponse illustré ici peut être tronqué à des fins de concision. Toutes les propriétés sont renvoyées à partir d’un appel réel.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
}