<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider/createCredentialRegistrationRequest(challenge:displayName:name:userID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASAuthorizationSecurityKeyPublicKeyCredentialProvider(im)createCredentialRegistrationRequestWithChallenge:displayName:name:userID:"
  },
  "title" : "createCredentialRegistrationRequest(challenge:displayName:name:userID:)"
}
-->

# createCredentialRegistrationRequest(challenge:displayName:name:userID:)

Creates a registration request with a challenge, display name, and user ID.

```
func createCredentialRegistrationRequest(challenge: Data, displayName: String, name: String, userID: Data) -> ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest
```

## Parameters

`challenge`

A stream of bytes that the server provides to prove an authenticator is valid.

`displayName`

The proper name of the user.

`name`

The name of the user.

`userID`

The user’s account identifier.

## Return Value

A security key credential registration request.

---

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)