Skip to content

Connect-MgGraph auth failed with -ClientID -TenantID #3515

Description

Describe the bug

I am trying to connect through an Azure app I have created. In the latest releases of Microsoft.Graph (both 2.34 and 2.35) the connection fails.

Expected behavior

Connect-MgGraph -ClientId $clientID -TenantId $tenantID should work

How to reproduce

  1. Execute Connect-MgGraph -ClientId $clientID -TenantId $tenantID
  2. Web Account Manager (WAM) ask me which account I would use
  3. A dialog return error with the following details:

Request Id: c3023c1a-0315-4606-82f7-414e75035500
Correlation Id: ae100d85-7ead-4de3-84e4-3c494a685530
Timestamp: 2026-02-02T09:06:35Z
Message: AADSTS50011: The redirect URI 'ms-appx-web://Microsoft.AAD.BrokerPlugin/e5a1e268-16f4-4d3b-9a27-98cba7ee612d' specified in the request does not match the redirect URIs configured for the application 'e5a1e258-17e4-4c3b-9b27-98cba7ee612d'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal.

SDK Version

2.35

Latest version known to work for scenario above?

2.33

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Activity

  1. saieramusic commented on Feb 2, 2026

    @saieramusic

    Dario Corrada (@dcorrada) Try going to your Azure portal - App Registration (search your app by the above app ID or the known name) - Authentication - Mobile and Desktop application then Edit, enter in the Redirect URI a new entry exactly as posted above "ms-appx-web://Microsoft.AAD.BrokerPlugin/e5a1e268-16f4-4d3b-9a27-98cba7ee612d". Try your login again. Note, I'd avoid pasting app IDs in public forums in the future.

  2. MIchaelMainer commented on Feb 2, 2026

    @MIchaelMainer
    Contributor

    Credit to saieramusic for providing the answer.

  3. dcorrada commented on Feb 4, 2026

    @dcorrada
    Author

    Thanks for the promptly response.

    By the way, the app IDs I have posted on this thread were invented to describe the issue for explanatory purposes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions