<!--
{
  "availability" : [
    "macOS: 10.3.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecCredentialType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@E@SecCredentialType"
  },
  "title" : "SecCredentialType"
}
-->

# SecCredentialType

The credential type to be returned by [`SecKeyGetCredentials`](/documentation/Security/SecKeyGetCredentials).

```
enum SecCredentialType
```

## Overview

See the section “Servers and the Keychain” in the [macOS Keychain Services Tasks](https://developer.apple.com/library/archive/documentation/Security/Conceptual/keychainServConcepts/03tasks/tasks.html#//apple_ref/doc/uid/TP30000897-CH205) chapter of [Keychain Services Programming Guide](https://developer.apple.com/library/archive/documentation/Security/Conceptual/keychainServConcepts/01introduction/introduction.html#//apple_ref/doc/uid/TP30000897) for information on the use of UI with keychain tasks.

## Topics

### Constants

[`SecCredentialType.default`](/documentation/Security/SecCredentialType/default)

The default setting for determining whether to present UI is used.

[`SecCredentialType.withUI`](/documentation/Security/SecCredentialType/withUI)

Keychain operations on keys that have this credential are allowed to present UI if required.

[`SecCredentialType.noUI`](/documentation/Security/SecCredentialType/noUI)

Keychain operations on keys that have this credential are not allowed to present UI, and will fail if UI is required.



---

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)