Unable to locate client ID in Microsoft Entra admin center

Hong 1,746 Reputation points
2026-10-28T14:39:54.0433333+00:00

An app has been using CommunityToolkit.Authentication.MsalProvider to access OneDrive successfully for a long time.

It uses public MsalProvider(string clientId, string[] scopes = default, string redirectUri = default, bool autoSignIn = true, bool listWindowsWorkAndSchoolAccounts = true, string tenantId = default);

The clientId is "8c6..." and it is still working perfectly after I migrated the app from UWP to WinUI. However, I cannot find this clientId anywhere in the Microsoft Entra admin center. It is very similar to the situation of Mystery client ID as Microsoft Account identity provider; where are you and how can I find you? I tried the solution in the question to no avail.

Could anyone offer a tip on how to locate it?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

1 answer

Sort by: Newest
  1. AI answer

    2026-10-28T14:41:44.57+00:00

    Search the exact client ID under Entra ID → Enterprise applications → All applications first, because the app registration may be owned by another directory while only its local service principal exists in the directory currently selected.

    1. Search the local service principal

    1. In the Microsoft Entra admin center, switch to the directory used by the account that currently signs into the app.
    2. Go to Entra ID → Enterprise applications → All applications.
    3. Set Application Type to All Applications.
    4. Set Application ID starts with to the complete 8c6... client ID, and select Apply.

    Enterprise applications are service principals—the local representations of applications used in that tenant. App registrations are application objects and exist only in their home tenant.^1^ The portal’s default filters can otherwise hide Microsoft applications or other application types.^2^

    2. Query both object types by client ID

    Since the previous portal-based solution did not locate it, query Microsoft Graph directly. Replace the placeholder with the complete GUID:

    Connect-MgGraph -Scopes "Application.Read.All"
    
    $clientId = "8c6xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    
    Get-MgApplication -Filter "appId eq '$clientId'" |
        Format-List Id,DisplayName,AppId,SignInAudience,PublisherDomain
    
    Get-MgServicePrincipal -Filter "appId eq '$clientId'" |
        Format-List Id,DisplayName,AppId,AppOwnerOrganizationId,ServicePrincipalType
    

    Get-MgApplication supports filtering on AppId; Application.Read.All is one of its documented delegated permissions.^3^ Microsoft also documents filtering service principals with Get-MgServicePrincipal -Filter "appId eq '{AppId}'".^1^

    Interpret the results as follows:

    • Application object found: the selected directory contains the app registration—open App registrations and search for that client ID.
    • Only service principal found: the app is used in the selected directory but its registration is owned elsewhere. AppOwnerOrganizationId provides the home-organization clue. Switch to that directory if your account has access.
    • Neither found: the selected directory has neither the registration nor a local service principal. Repeat the query after switching through every directory accessible to the account that originally created the app. A comparable case was resolved by switching to the directory where the application had actually been registered.^4^
    • Authorization or consent error: this is a permissions problem, not evidence that the objects do not exist. Have an administrator grant an appropriate directory-read permission or run the lookup.

    Do not use an ID token’s tid claim as proof of the app registration’s home tenant. It identifies the token issuer/user tenant; for a multitenant application, that can be a tenant containing only a local service principal. Likewise, do not log or share access, refresh, or ID tokens.

    If it remains undiscoverable

    The toolkit constructor expects the registered client ID supplied by your application; it does not establish that the ID belongs to a toolkit-owned OneDrive registration.^5^ If no accessible directory contains the application object, the registration may belong to an old organizational directory or account to which access has been lost.

    Because the current ID still works, avoid replacing it immediately. First record its current scopes, supported account types, redirect URI, and observed sign-in behavior. If ownership cannot be recovered, create a new registration under a directory you control, configure the required account types and desktop redirect URI, then update and test the WinUI application before retiring the old ID.^6^


    References

    1. Application and service principal objects in Microsoft Entra ID
    2. Quickstart: View enterprise applications
    3. Get-MgApplication-Description
    4. How to figure out account email for app given client id in entra ID? - Microsoft Q&A
    5. MsalProvider Constructors-Definition
    6. Quickstart: Sign in users and call Microsoft Graph in a Universal Windows Platform app
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.