Skip to content

Connect-MgGraph Entry point was not found. #3044

@alessandroere

Description

@alessandroere

Describe the bug

Hi, running
Connect-MgGraph -ClientID $microsoftGraph.appID -TenantId $microsoftGraph.tenantID -Certificate $microsoftGraph.certificate
i get the error reported on title.

Here the debug output about Connect-MgGraph command:

DEBUG: ClientCertificateCredential.GetToken invoked. Scopes: [ https://graph.microsoft.com/.default ] ParentRequestId:
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.10 Microsoft Windows 10.0.14393 [2024-11-29 15:50:32Z - bbec4bd7-a90f-4ef6-b288-5e9df0d7daeb] MSAL MSAL.CoreCLR with assembly version '4.56.0.0'. CorrelationId(bbec4bd7-a90
f-4ef6-b288-5e9df0d7daeb)
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.10 Microsoft Windows 10.0.14393 [2024-11-29 15:50:32Z - bbec4bd7-a90f-4ef6-b288-5e9df0d7daeb] === AcquireTokenForClientParameters ===
SendX5C: False
ForceRefresh: False

DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.10 Microsoft Windows 10.0.14393 [2024-11-29 15:50:32Z - bbec4bd7-a90f-4ef6-b288-5e9df0d7daeb]
=== 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 - bbec4bd7-a90f-4ef6-b288-5e9df0d7daeb
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:

Same error with powershell 7 and 5.1

Expected behavior

Running
Connect-MgGraph -ClientID $microsoftGraph.appID -TenantId $microsoftGraph.tenantID -Certificate $microsoftGraph.certificate

than get the welcome message

How to reproduce

Install Microsoft Graph Authentication module version 2.25.0

Execute command
Connect-MgGraph -ClientID $microsoftGraph.appID -TenantId $microsoftGraph.tenantID -Certificate $microsoftGraph.certificate

SDK Version

2.25.0

Latest version known to work for scenario above?

2.24.0

Known Workarounds

No response

Debug output

Click to expand log ``` DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.10 Microsoft Windows 10.0.14393 [2024-11-29 15:50:32Z - bbec4bd7-a90f-4ef6-b288-5e9df0d7daeb] === Token Acquisition (ClientCredentialRequest) started: Scopes: https://graph.microsoft.com/.default Authority Host: login.microsoftonline.com DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.10 Microsoft Windows 10.0.14393 [2024-11-29 15:50:32Z - bbec4bd7-a90f-4ef6-b288-5e9df0d7daeb] [Instance Discovery] Instance discovery is enabled and will be performed DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.10 Microsoft Windows 10.0.14393 [2024-11-29 15:50:32Z - bbec4bd7-a90f-4ef6-b288-5e9df0d7daeb] [Region discovery] Not using a regional authority. DEBUG: Request [efad1ee5-0579-47cc-977d-2d647be875d7] POST https://login.microsoftonline.com/5f4c80c0-58ee-4e80-8990-b80e85ad9e5b/oauth2/v2.0/token x-client-SKU:REDACTED x-client-Ver:REDACTED x-client-CPU:REDACTED x-client-OS:REDACTED x-client-current-telemetry:REDACTED x-client-last-telemetry:REDACTED x-ms-PKeyAuth:REDACTED x-ms-lib-capability:REDACTED client-request-id:REDACTED return-client-request-id:REDACTED x-app-name:REDACTED x-app-ver:REDACTED Content-Type:application/x-www-form-urlencoded x-ms-client-request-id:efad1ee5-0579-47cc-977d-2d647be875d7 x-ms-return-client-request-id:true User-Agent:azsdk-net-Identity/1.10.3 (.NET 8.0.10; Microsoft Windows 10.0.14393) client assembly: Azure.Identity
</details>


### Configuration

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.7513
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.7513
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


OS version: Windows Server 2016 V1607 build 14393.7515

### Other information

_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