Skip to content

[Bug] Connect-MgGraph with powershell 7.5.0 show error: Entry point not found #5162

@alessandroere

Description

@alessandroere

Library version used

4.8.03761

.NET version

Hi,
i have a powershell script that use Microsoft Graph SDK to connect to Microsoft 365.
When i run the script i get Entry Point not found from command Connect-MGGraph. I suppose that the problem is the MSAL but i don't know how to fix the error.
Here the debug output for command Connect-MgGraph
`=== Request Data ===
Authority Provided? - True
Scopes - https://graph.microsoft.com/.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenForClient
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - ec340abd-ef5b-4386-bd88-6d9dc9faebb9
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:

DEBUG: False MSAL 4.66.1.0 MSAL.NetCore .NET 9.0.1 Microsoft Windows 10.0.14393 [2025-02-27 22:59:22Z - ec340abd-ef5b-4386-bd88-6d9dc9faebb9] === Token Acquisition (ClientCredentialRequest) started:
Scopes: https://graph.microsoft.com/.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.66.1.0 MSAL.NetCore .NET 9.0.1 Microsoft Windows 10.0.14393 [2025-02-27 22:59:22Z] [Internal cache] Clearing app token cache accessor.
DEBUG: False MSAL 4.66.1.0 MSAL.NetCore .NET 9.0.1 Microsoft Windows 10.0.14393 [2025-02-27 22:59:22Z - ec340abd-ef5b-4386-bd88-6d9dc9faebb9] [Internal cache] Total number of cache partitions found whil
e getting access tokens: 0
DEBUG: False MSAL 4.66.1.0 MSAL.NetCore .NET 9.0.1 Microsoft Windows 10.0.14393 [2025-02-27 22:59:22Z - ec340abd-ef5b-4386-bd88-6d9dc9faebb9] [FindAccessTokenAsync] Discovered 0 access tokens in cache u
sing partition key: 5ae2aca2-138a-44e7-862a-1d6fe9c9b959_5f4c80c0-58ee-4e80-8990-b80e85ad9e5b_AppTokenCache
DEBUG: False MSAL 4.66.1.0 MSAL.NetCore .NET 9.0.1 Microsoft Windows 10.0.14393 [2025-02-27 22:59:22Z - ec340abd-ef5b-4386-bd88-6d9dc9faebb9] [Instance Discovery] Instance discovery is enabled and will
be performed
DEBUG: False MSAL 4.66.1.0 MSAL.NetCore .NET 9.0.1 Microsoft Windows 10.0.14393 [2025-02-27 22:59:22Z - ec340abd-ef5b-4386-bd88-6d9dc9faebb9] [Region discovery] Not using a regional authority.
DEBUG: Request [32fe00f0-76e8-43e6-859e-06fb275ce002] POST https://login.microsoftonline.com/5f4c80c0-58ee-4e80-8990-b80e85ad9e5b/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-ms-PKeyAuth:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:32fe00f0-76e8-43e6-859e-06fb275ce002
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.13.1 (.NET 9.0.1; Microsoft Windows 10.0.14393)
client assembly: Azure.Identity`

Someone can help me to understand this problem

I create a fresh installation of Windows server 2016 but i always got the same problem

I notice that when in the debug output show that it's using the MSAL version 4.67.2.0 all works. I don't know how to force to use this version

Thank

Scenario

Other - please specify

Is this a new or an existing app?

The app is in production, I haven't upgraded MSAL, but started seeing this issue

Issue description and reproduction steps

On Windows server 2016 with powershell 7.5.0
Execute the command Connect-MgGraph

Relevant code snippets

Expected behavior

Command should connect to microsoft graph APIs

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

4.66.1.0

Solution and workarounds

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions