---
schema_version: "1"
id: fce261729185e8d6ca9ccb3b69b16ff405bbec8dc4e066c6fd90e72ed31ae068
title: Extend Your Custom Apps with the Ability to Update and Delete Named Credentials from Apex
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/260-0-0/rn_security_named_credentials_update_delete_nc.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_security_named_credentials_update_delete_nc.htm&release=260&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2457590f9e358a307c0cdb34c7116fa5628b38cb0d3ff3b3cfc25925a8d5f2e5
description: You can now update or delete a named credential, an external credential, or an external auth identity provider from Apex. ISVs and partners that build managed package apps can use these new Apex methods for automated setup and more flexible management of external system integrations. If a customer uses a managed package that programmatically updates the endpoint URL for a named credential or any URL fields on its related external credential or auth identity provider, the Enabled for Callouts field on the named credential is turned off until an admin manually reviews and enables it.
products:
  - Cross Cloud Packages Solutions
release: "260"
---
# Extend Your Custom Apps with the Ability to Update and Delete Named Credentials from Apex

You can now update or delete a named credential, an external credential, or an external auth identity provider from Apex. ISVs and partners that build managed package apps can use these new Apex methods for automated setup and more flexible management of external system integrations. If a customer uses a managed package that programmatically updates the endpoint URL for a named credential or any URL fields on its related external credential or auth identity provider, the Enabled for Callouts field on the named credential is turned off until an admin manually reviews and enables it.

**Where:** This change applies to Lightning Experience in Enterprise, Performance, Unlimited, and Developer editions in API version 66.0 and later.

**Why:** ISVs and partners often need to manage multiple target endpoints for different customers, making packaged credentials difficult to manage. Previously, developers could only programmatically create named credentials, which required manual intervention for any subsequent updates or removals.

**How:** Developers use these new Apex methods to update and delete credentials via a UI in their managed packages: `deleteExternalAuthIdentityProvider`, `updateExternalAuthIdentityProvider`, `deleteExternalCredential`, `updateExternalCredential`, `deleteNamedCredential`, and `updateNamedCredential`. If the named credential Enabled for Callouts field is turned off, the customer admin must review any endpoint changes to the named credential or its related external credential or external auth identity provider and manually enable the field.

#### See Also

- [_Apex Developer Guide_: NamedCredentials Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_NamedCredentials_static_methods.htm#apex_ConnectAPI_NamedCredentials_methods)
- [_Named Credentials Developer Guide_: Update or Delete an OAuth Named Credential](https://developer.salesforce.com/docs/platform/named-credentials/guide/nc-update-delete-oauth-cred.html)