Skip to content

Frequently need to reinstall the SDK modules #3436

Description

@MiamiFinsFan13

Describe the bug

I frequently have to reinstall the Graph SDK modules (both prod and beta) because after a few months, when running commands I will start getting this error -
get-mguser: The 'get-mguser' command was found in the module 'Microsoft.Graph.Users', but the module could not be loaded due to the following error: [Assembly with same name is already loaded]
For more information, run 'Import-Module Microsoft.Graph.Users'.

The only thing that I have found to be effective to resolve the issue is to run Install-Module Microsoft.Graph -AllowClobber -Force -Scope AllUsers (same for beta). Updating doesn't work and importing the module doesn't work because it is already there.

Expected behavior

expecting to just be able to run the commands

How to reproduce

n/a - seems to be random

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Activity

  1. 12Knocksinna commented on Nov 12, 2025

    @12Knocksinna
    Contributor

    What version of the SDK are you using? There are some known problems with assembly clashes between the SDK and other modules (like Teams and Exchange). Maybe you're being affected by the recent deprecation of .NET6? In any case, I would upgrade to V2.32 (which is a stable release, IMHO) and always load the SDK into a PowerShell session first to make sure that its required assemblies (especially MSAL) are available.

    More background here: https://office365itpros.com/2025/09/24/assembly-clash-microsoft-365-ps/

  2. MiamiFinsFan13 commented on Nov 13, 2025

    @MiamiFinsFan13
    Author

    The last time this happened (what prompted this post) I upgraded to 2.32.0. I'll keep an eye on the order i load modules

  3. gavinbarron commented on Nov 17, 2025

    @gavinbarron
    Member

    Closing this as there's simply not enough environment information to work with here.

    Please feel free to reopen if needed with SDK version, PS Version etc if needed

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

Metadata

Metadata

Assignees

No one assigned

    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