Skip to content

Any version beyond 2.19.0 of the Microsoft Graph Powershell module is causing errors in various Graph commands #2980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AdamBlaumann opened this issue Oct 1, 2024 · 6 comments
Labels
no-recent-activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:bug A broken experience

Comments

@AdamBlaumann
Copy link

AdamBlaumann commented Oct 1, 2024

Describe the bug

In the past months we've had several cases of our Microsoft Graph PS commands not working, for some of them we even opened Microsoft support cases.
We found that returning to version 2.19.0 of Microsoft.Graph always resolves the issue, but we can't stay on this version forever.

The Connect-Graph or Connect-MgGraph command is always executed successfully, but then certain Graph commands (from different submodules) run into a generic error message, which is always the same: "An error occurred while sending the request."

There is no further information provided, even if we run them in verbose mode.

I've began wondering if perhaps there was a change in how the module connects with the M365 tenant, and maybe we need to have our firewall rules adjusted.
Were there any changes after version 2.19.0 in how the module connects?
Is the connection using a different port? Different target IP range?

Expected behavior

The graph commands run without throwing an error

How to reproduce

  1. Install version 2.20.0 or later of the Graph module on one of our Windows servers
  2. Run Connect-Graph with a user account or service principal
  3. Run a graph command that the user account or service principal has permission to run (example: Get-MgApplication or Get-MgUser)

SDK Version

2.20.0, 2.21.0, 2.22.0

Latest version known to work for scenario above?

2.19.0

Known Workarounds

Avoid upgrading from version 2.19.0

Debug output

Click to expand log ```
</details>


### Configuration

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

OS: Microsoft Windows Server 2019 Standard (Build 17763) x64

### Other information

_No response_
@AdamBlaumann AdamBlaumann added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Oct 1, 2024
@timayabi2020
Copy link
Contributor

Hi @AdamBlaumann thank you for raising this issue. Could you please let us know which version of ExchangeOnline you are using and also share debug output of any cmdlet after connecting to graph.

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Oct 22, 2024
@AdamBlaumann
Copy link
Author

AdamBlaumann commented Oct 23, 2024 via email

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Oct 23, 2024
@timayabi2020
Copy link
Contributor

@AdamBlaumann you need to upgrade to EXO version 3.6.0. See related issue here #2803

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 labels Oct 28, 2024
@AdamBlaumann
Copy link
Author

@timayabi2020 That is not our issue. I probably shouldn't have mentioned the Exchange Online Management module at all. I've removed the part of the problem description that had any mention of it.
The issue is encountered when using the Graph module by itself. We don't need to import or use the Exchange Online Management module to encounter the issue.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Oct 29, 2024
@timayabi2020
Copy link
Contributor

@AdamBlaumann please share the output of this command [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object Location | Sort-Object -Property FullName | Select-Object -Property FullName, Location | Out-GridView so that we confirm if there are any assembly version conflicts loaded in the session.

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 labels Oct 29, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-recent-activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants