<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASPasswordCredentialIdentity/init(serviceIdentifier:user:recordIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASPasswordCredentialIdentity(im)initWithServiceIdentifier:user:recordIdentifier:"
  },
  "title" : "init(serviceIdentifier:user:recordIdentifier:)"
}
-->

# init(serviceIdentifier:user:recordIdentifier:)

Initializes a password credential identity.

```
init(serviceIdentifier: ASCredentialServiceIdentifier, user: String, recordIdentifier: String?)
```

## Parameters

`serviceIdentifier`

The service identifier for the identity.

`user`

The user associated with the identity.

`recordIdentifier`

A string that your app can set to correlate the identity with an entry in your password database.

## Discussion

---

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)