> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Credentials table

> Alternative credentials

## Credentials Table (250)

Alternative credentials

## Fields

| Name                      | Description                                                                                                        | Type                                                | Nullable |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | :------: |
| Credentials\_id           | Primary key                                                                                                        | PK                                                  |    No    |
| associateId               | Associate that these credentials iare an alternative identification for                                            | FK [associate](./associate.mdx)                     |    No    |
| credentialType            | What type of credentials is this                                                                                   | String(254)                                         |    No    |
| searchName                | Searchable (plaintext) representation of credentials                                                               | String(254)                                         |    No    |
| secret                    | Encrypted secret                                                                                                   | String(2000)                                        |    No    |
| validFrom                 | Start of validity for these credentials                                                                            | DateTime                                            |    No    |
| validTo                   | End of validity for these credentials                                                                              | DateTime                                            |    No    |
| isActive                  | What kind of usage are these credentials for; see enum CredentialUsage for details                                 | Enum [CredentialUsage](./enums/credentialusage.mdx) |    No    |
| encryptedCheck            | Encrypted checksum; tampering will block system usage                                                              | String(254)                                         |    No    |
| lastUsedDate              | When were these credentials last used for login                                                                    | DateTime                                            |    Yes   |
| lastusedInfo              | Provider-specific usage information, for instance an IP adrdess or other location                                  | String(254)                                         |    Yes   |
| comment                   | Free text comment                                                                                                  | String(254)                                         |    Yes   |
| registered                | Registered when                                                                                                    | UtcDateTime                                         |    No    |
| registered\_associate\_id | Registered by whom                                                                                                 | FK [associate](./associate.mdx)                     |    No    |
| updated                   | Last updated when                                                                                                  | UtcDateTime                                         |    No    |
| updated\_associate\_id    | Last updated by whom                                                                                               | FK [associate](./associate.mdx)                     |    No    |
| updatedCount              | Number of updates made to this record                                                                              | UShort                                              |    No    |
| personId                  | Associates' person; or just the person, if this points to a potential associate (created on-demand on first login) | FK [person](./person.mdx)                           |    Yes   |
| extraId                   | Spare field, used at the plugins discretion                                                                        | Id                                                  |    Yes   |
| displayType               | Lead-text used in GUI, originally from plugin. Used as fallback when plugins are missing                           | String(254)                                         |    Yes   |
| displayName               | Friendly name of credentials (searchname could be a SID, this should be a real name)                               | String(254)                                         |    Yes   |

<img src="https://mintcdn.com/superofficeas/-KbDeS3ObOMH8eFq/media/loc/en/database/tables/Credentials.png?fit=max&auto=format&n=-KbDeS3ObOMH8eFq&q=85&s=1c232e5c3f146845224729332f5c4379" alt="Credentials table relationship diagram" width="615" height="66" data-path="media/loc/en/database/tables/Credentials.png" />

## Indexes

| Fields                                                        | Types                                     | Description |
| ------------------------------------------------------------- | ----------------------------------------- | ----------- |
| searchName                                                    | String(254)                               | Index       |
| credentialType, personId                                      | String(254), FK                           | Index       |
| credentialType, searchName                                    | String(254), String(254)                  | Unique      |
| credentialType, isActive, Credentials\_id, validFrom, validTo | String(254), Enum, PK, DateTime, DateTime | Index       |

## Relationships

| Table                    | Description                                                        |
| ------------------------ | ------------------------------------------------------------------ |
| [associate](./associate) | Employees, resources and other users - except for External persons |
| [person](./person)       | Persons                                                            |

## Replication Flags

* Area Management controlled table. Contents replicated to satellites and traveller databases.
* Replicate changes UP from satellites and travellers back to central.
* Copy to satellite and travel prototypes.

## Security Flags

* No access control via user's Role.


## Related topics

- [Save Credential](/en/api/reference/restful/agent/user_agent/save-credential.md)
- [NSCredentialType](/en/automation/crmscript/reference/CRMScript.NetServer.NSCredentialType.md)
- [Get Credential Types](/en/api/reference/restful/rest/user/get-credential-types.md)
- [Get Credential Types For User Type](/en/api/reference/restful/agent/user_agent/get-credential-types-for-user-type.md)
- [SuperOffice.WebApi.Data.CredentialType](/en/api/reference/webapi/SuperOffice.WebApi.Data.CredentialType.md)
