NamedCredential
Represents a named credential, which specifies the URL of a callout endpoint and its required authentication parameters in one definition. A named credential can be specified as an endpoint to simplify the setup of authenticated callouts.
Where possible, we changed noninclusive terms to align with our company value of equality. We maintained certain terms to avoid any effect on customer implementations.
All credentials stored within this entity are encrypted under a framework that is consistent with other encryption frameworks on the platform. Salesforce encrypts your credentials by auto-creating org-specific keys. Credentials encrypted for using the previous encryption scheme have been migrated to the new framework.
Introduced in API version 47.0.
create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()
DELETE, GET, HEAD, PATCH, POST, Query
-
Type: ID
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: The authentication provider that the AuthProviderId component represents.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: textarea
-
Required: No
-
Properties: Nillable
-
Introduced: API version 46.0
-
Description: The URL where JSON Web Tokens (JWTs) are exchanged for access tokens.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: First part of the access key used to sign programmatic requests to Amazon Web Services (AWS). Use when AWS Signature Version 4 is your authentication protocol.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: textarea
-
Required: No
-
Properties: Nillable
-
Description: The second part of the access key that’s used to sign programmatic requests to AWS. Use when AWS Signature Version 4 is your authentication protocol.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: Specifies which AWS Region the named credential accesses.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: Specifies which AWS resource the named credential accesses.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: picklist
-
Required: No
-
Properties: Filter, Group, Nillable, Restricted picklist, Sort
-
Introduced: API version 58.0
-
Description: Specifies whether the named credential is enabled for callouts.
Valid values are:
-
Disabled: The named credential is disabled for callouts. -
Enabled: The named credential is enabled for callouts. -
Possible values:
-
Enabled — Enabled
-
Disabled — Disabled
-
-
Type: reference
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: If you specify a certificate, your Salesforce org supplies it when establishing each two-way SSL connection with the external system. The certificate is used for digital signatures, which verify that requests are coming from your Salesforce org.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
- Relationship name: Certificate
- Relationship type: relationship
- Refers to: Certificate
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 64.0
-
Description: A human-readable description of this named credential parameter.
-
Type: string
-
Required: No
-
Properties: Filter, Group, Sort
-
Description: The developer’s internal name for the named credential used in the API.
This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is automatically generated, but you can supply your own value if you create the record using the API.
When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record.
Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.
-
Type: textarea
-
Required: No
-
Properties: Nillable
-
Description: The URL or root URL of the callout endpoint. Corresponds to URL in the user interface.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: string
-
Required: No
-
Properties: Create, Group, Nillable
-
Description: The full name of the associated type in Tooling API. The full name can include a namespace prefix. Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
-
Type: textarea
-
Required: No
-
Properties: Nillable
-
Introduced: API version 46.0
-
Description: External service or other allowed recipients for the JWT. Written as JSON, with a quoted string for a single audience and an array of quoted strings for multiple audiences. Single audience example: “aud1”. Multiple audiences example: [“aud1”, “aud2”, “aud3”].
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 46.0
-
Description: Formula string calculating the Subject of the JWT. API names and constant strings, in single quotes, can be included. Allows a dynamic Subject unique per user requesting the token. For example,
'User='+$User.Id. Use this field whenprincipalTypeis set toPerUser. Corresponds toPer User Subject.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 46.0
-
Description: Specify who issued the JWT using a case-sensitive string.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: reference
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: Certificate verifying the JWT’s authenticity to external sites.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
- Relationship name: JwtSigningCertificate
- Relationship type: relationship
- Refers to: Certificate
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 46.0
-
Description: Static text, without quotes, that specifies the JWT Subject. Use this field when
principalTypeis set toNamedUser. Corresponds toNamed Principal Subjectin the user interface.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: int
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 46.0
-
Description: Specify the number of seconds that the token is valid.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: picklist
-
Required: No
-
Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
-
Description: The language of the Named Credential.
-
Possible values:
-
en_US — English
-
de — German
-
es — Spanish
-
fr — French
-
it — Italian
-
ja — Japanese
-
sv — Swedish
-
ko — Korean
-
zh_TW — Chinese (Traditional)
-
zh_CN — Chinese (Simplified)
-
pt_BR — Portuguese (Brazil)
-
nl_NL — Dutch
-
da — Danish
-
th — Thai
-
fi — Finnish
-
ru — Russian
-
es_MX — Spanish (Mexico)
-
no — Norwegian
-
-
Type: picklist
-
Required: No
-
Properties: Filter, Group, Nillable, Restricted picklist, Sort
-
Description: Indicates the manageable state of the specified component that is contained in a package.
-
Possible values:
-
beta — beta — Managed-Beta
-
deleted — deleted — Managed-Proposed-Deleted
-
deprecated — deprecated — Managed-Proposed-Deprecated
-
deprecatedEditable — deprecatedEditable — SecondGen-Installed-Deprecated
-
installed — installed — Managed-Installed
-
installedEditable — installedEditable — SecondGen-Installed-Editable
-
released — released — Managed-Released
-
unmanaged — unmanaged
-
-
Type: string
-
Required: No
-
Properties: Filter, Group, Sort
-
Description: The main label for the named credential. This display value is the internal label that doesn’t get translated.
Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
-
Type: complexvalue
-
Required: No
-
Properties: Create, Nillable, Update
-
Description: Provides access to the associated metadata type and related fields in Tooling API.
Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
-
Type: picklist
-
Required: No
-
Properties: Filter, Group, Nillable, Restricted picklist, Sort
-
Introduced: API version 53.0
-
Description: Specifies the type or behavior of this named credential. Valid values are:
This field is available in API version 56.0 and later.
-
Possible values:
-
Legacy — Legacy
-
SecuredEndpoint — SecuredEndpoint
-
PrivateEndpoint — PrivateEndpoint
-
Standard — Standard
-
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: The namespace prefix that is associated with this object. Each Developer Edition org that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the
namespacePrefix__componentNamenotation.
-
Type: textarea
-
Required: No
-
Properties: Nillable
-
Description: The OAuth refresh token. Used to obtain a new access token for an end user when a token expires.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: string
-
Required: No
-
Properties: Filter, Nillable, Sort
-
Description: Specifies the scope of permissions to request for the access token. Corresponds to Scope in the user interface.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: textarea
-
Required: No
-
Properties: Nillable
-
Description: The access token that’s issued by your authorization server.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: reference
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 49.0
-
Description: Specifies the outbound network connection that uses the named credential to send callouts to AWS.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
- Relationship name: OutboundNetworkConnection
- Relationship type: relationship
- Refers to: OutboundNetworkConnection
-
Type: textarea
-
Required: No
-
Properties: Nillable
-
Description: The password to be used by your org to access the external system. Ensure that the credentials have adequate privileges to access the external system. Depending on how you set up access, you might need to provide the administrator password.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Type: picklist
-
Required: No
-
Properties: Filter, Group, Nillable, Restricted picklist, Sort
-
Description: Determines whether you’re using one set or multiple sets of credentials to access the external system. Corresponds to Identity Type in the user interface. Valid values are:
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Possible values:
-
Anonymous — Anonymous
-
PerUser — Per User
-
NamedUser — Named Principal
-
NamedCustomPrincipal — Named Custom Principal
-
-
Type: picklist
-
Required: No
-
Properties: Filter, Group, Nillable, Restricted picklist, Sort
-
Description: The authentication protocol that’s required to access the external system.
For connections to Amazon Web Services using Signature Version 4, use AwsSv4.
For connections using a direct token system, select Jwt. If using an intermediary authorization provider to process JWTs and return access tokens, use JwtExchange.
For Simple URL data sources, select NoAuthentication.
For cloud-based Files Connect external systems, select Oauth. For on-premises systems, select Password.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
-
Possible values:
-
NoAuthentication — No Authentication
-
Oauth — OAuth 2.0
-
Password — Password Authentication
-
AwsSv4 — AWS Signature Version 4
-
Jwt — JWT
-
JwtExchange — JWT Token Exchange
-
Custom — Custom
-
Basic — Basic Authentication
-
-
Type: string
-
Required: No
-
Properties: Filter, Group, Nillable, Sort
-
Description: The username to be used by your org to access the external system. Ensure that the credentials have adequate privileges for performing callouts to the external system. Depending on how you set up access, you might need to provide the administrator username.
This field is valid only when NamedCredentialType is set to Legacy.
This field is deprecated in API version 56.0.
Represents the parameters that configure a named credential. Named credential parameters are used to configure Named Credential callouts through a combination of the type, name, and value/lookup fields.
These parameters are used internally to provide a flexible architecture and are exposed here for packaging reasons.
| Field | Description |
|---|---|
Certificate | - Type: string - Properties: Nillable - Description: If the value of the ParameterType field is ClientCertificate then this field references the certificate. - Relationship Name: Certificate - Relationship Type: Lookup - Refers To: Certificate |
Description | - Type: string - Properties: Nillable - Description: A human-readable description of this named credential parameter. |
ExternalCredential | - Type: string - Properties: Nillable - Description: If the value of the ParameterType field is Authentication, then this field references an external credential that in turn references a set of authenticated user credentials. |
OutboundNetworkConnection | - Type: string - Properties: Nillable - Description: The lookup field for the OutboundNetworkConnection parameter type. Used when namedCredentialType is PrivateEndpoint. |
ParameterSettingsGlobalNamedPrincipalCredential | - Field Type: boolean - Description: Reserved for internal use. |
ParameterSettingsManagedFeatureEnabledCallout | - Field Type: boolean - Description: Reserved for internal use. |
ParameterSettingsReadOnlyNamedCredential | - Field Type: boolean - Description: Reserved for internal use. |
ParameterSettingsSystemUserNamedCredential | - Field Type: boolean - Description: Reserved for internal use. |
ParameterName | - Type: string - Properties: Nillable - Description: Required. The name of the named credential parameter. |
ParameterType | - Type: NamedCredentialParamType (enumeration of type string) - Properties: Nillable - Description: Required. The type of the named credential parameter. Valid values are:
|
ParameterValue | - Type: string - Properties: Nillable - Description: If the ParameterType field describes a literal value, such as Url, then the literal value is stored in this field, such as https://iam.amazonaws.com/. |
SequenceNumber | - Type: int - Properties: Nillable - Description: Used to order HttpHeader parameters. |