Изменить

Поделиться через


Add and manage application credentials in Microsoft Entra ID

When building confidential client applications, managing credentials effectively is critical. This article explains how to add client certificates, federated identity credentials, or client secrets to your app registration in Microsoft Entra. These credentials enable your application to authenticate itself securely and access web APIs without user interaction.

Prerequisites

Add a credential to your application

When you create credentials for a confidential client application:

  • Microsoft recommends that you use a certificate instead of a client secret before moving the application to a production environment. For more information on how to use a certificate, see instructions in Microsoft identity platform application authentication certificate credentials.

  • For testing purposes, you can create a self-signed certificate and configure your apps to authenticate with it. However, in production, you should purchase a certificate signed by a well-known certificate authority, then use Azure Key Vault to manage certificate access and lifetime.

To learn more about client secret vulnerabilities, refer to Migrate applications away from secret-based authentication.

Sometimes called a public key, a certificate is the recommended credential type because they're considered more secure than client secrets.

  1. In the Microsoft Entra admin center, in App registrations, select your application.

  2. Select Certificates & secrets > Certificates > Upload certificate.

  3. Select the file you want to upload. It must be one of the following file types: .cer, .pem, .crt.

  4. Select Add.

  5. Record the certificate Thumbprint for use in your client application code.

    Screenshot of the Microsoft Entra admin center, showing the Certificates tab in the Certificates and secrets pane in an app registration.