CPM - Azure Plugin - AADSTS700016: Application with identifier '[ApplicationID]' was not found in the directory 'Tenant Name'

CPM - Azure Plugin - AADSTS700016: Application with identifier '[ApplicationID]' was not found in the directory 'Tenant Name'

180
Created On 11/10/26 11:00 AM - Last Modified 11/10/26 15:55 PM


Symptom


When attempting to initiate a verify or change task on an Azure AD account in PVWA, you may encounter an error message similar to the following:

"Failed to connect to Azure. Given application ID requires a 'Client Secret'. Code 8040"

 

Additionally, the CPM debug logs may display the following errors:

29/01/2025 12:26:35.994 | ERROR -> RequestBase :: SubmitRequest -> Failed to submit request. Received status code: 400 - BadRequest.

29/01/2025 12:26:36.056 | ERROR -> TokenError :: Get -> Received error type: unauthorized_client. Error description: AADSTS700016: Application with identifier '[ApplicationID]' was not found in the directory 'Tenant Name'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.

29/01/2025 12:26:36.072 | ERROR -> BaseAction :: SetPlatformOutputMessage -> Failure : Verify process failed - Failed to connect to Azure. Invalid ApplicationID.


Environment


Privileged Access Manager (PAM, self-hosted);Privilege Cloud Central Policy Manager (CPM)

Azure



Cause


This error message originates from the Azure side and is likely occurring because the application is configured as a Public Client Application. For the Azure AD Enterprise connection, the application should be configured as either a Confidential Client Application or a Web Application.

MSAL Client Applications Overview

The Microsoft Authentication Library (MSAL) supports two primary types of client applications: Public and Confidential. Each is designed for different use cases and security requirements.

Public Client Applications

Public client applications are typically used on devices such as desktops, mobile apps, and other user-facing platforms. These apps cannot securely store secrets and instead rely on user-based authentication to access APIs. Examples include native applications that authenticate users interactively.

Confidential Client Applications

Confidential client applications run on servers and can securely store credentials (secrets), allowing them to authenticate themselves to the authorization server. These apps are used in scenarios where the application needs to prove its identity, such as during service-to-service communications.

Key Concepts and Flows

  • Public Client Flows: These flows are used in scenarios where user authentication is needed, but the app cannot securely store secrets (e.g., native authentication or device code flow).
  • Confidential Client Flows: These flows are used by applications that securely store secrets (e.g., in managed identities or secure vaults) to authenticate and interact with APIs on behalf of a service.

It’s important to follow best practices for securely managing client credentials to prevent unauthorized access, impersonation, or security breaches. When configuring MSAL client applications, ensure the correct flow is applied based on the application type to maintain strong security.

For more details on this topic, please reach out to Microsoft support directly.

 



Resolution


To resolve this issue, you will need to enable "Allow public client flows" for your application in Azure Active Directory (Azure AD). Please follow the steps below to enable this setting:

  1. Access Azure Active Directory:

    • Log in to the Azure Portal.
    • Navigate to Azure Active Directory.
  2. Select Your Application:

    • In the left-hand menu, click on App registrations.
    • Choose the application you wish to configure.
  3. Configure Authentication Settings:

    • Within your application's settings, select Authentication.
    • Scroll down to the Advanced settings section.
    • Locate the Allow public client flows option.
    • Set Allow public client flows to Yes.

Enabling this setting allows your application to use public client flows, such as device code flow or native authentication, which are suitable for applications that cannot securely store client secrets such as the CyberArk Plugin.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000yvdCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail