<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecureElementCredential",
  "identifier" : "/documentation/SecureElementCredential/CredentialSession/provisionCredential(configurationUUID:name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SecureElementCredential"
    ],
    "preciseIdentifier" : "s:23SecureElementCredential0C7SessionC09provisionC017configurationUUID4nameAC0C0V10Foundation0G0V_SStYaKF"
  },
  "title" : "provisionCredential(configurationUUID:name:)"
}
-->

# provisionCredential(configurationUUID:name:)

Creates a credential in the Secure Element.

```
func provisionCredential(configurationUUID: UUID, name: String) async throws -> CredentialSession.Credential
```

## Parameters

`configurationUUID`

A UUID corresponding to an product configuration configured on the [Apple Business Register](https://register.apple.com/login) portal. The system uses the corresponding product configuration to provision the instance associated with the created credential. The UUID is opaque to the device.

`name`

A friendly name assigned for ease of identification the provisioned credential. The name is opaque to the device.

## Return Value

A [`CredentialSession.Credential`](/documentation/SecureElementCredential/CredentialSession/Credential), initialized with the [`CredentialSession.Credential.State.installationPending`](/documentation/SecureElementCredential/CredentialSession/Credential/State-swift.enum/installationPending) state.

## Discussion

This method installs into the Secure Element an applet bundle that you’ve submitted through the [Apple Business Register](https://register.apple.com/login) portal.

> Note: If there is not enough space in the Secure Element to provision the new credential, the system shows a space management UI over the current app.
> A person using the device can use this interface to remove other credentials to free up space or cancel the provisioning attempt.

- The most common errors are:
  - [`CredentialSession.ErrorCode.invalidInput`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidInput): The `name` parameter is empty.
  - [`CredentialSession.ErrorCode.invalidSessionState`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidSessionState): The session isn’t in the [`CredentialSession.State.management`](/documentation/SecureElementCredential/CredentialSession/State-swift.enum/management) state.
  - [`CredentialSession.ErrorCode.invalidProductConfigID`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidProductConfigID): The `configurationUUID` does not correspond to a known product configuration.
  - [`CredentialSession.ErrorCode.insufficientSpace`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/insufficientSpace): The Secure Element doesn’t have enough storage space.
  - [`CredentialSession.ErrorCode.network`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/network): A network error occurred during provisioning.
  - [`CredentialSession.ErrorCode.conditionsNotSatisfied`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/conditionsNotSatisfied): The iCloud account or passcode conditions aren’t met.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)