Azure / CloudShell

Container Image for Azure Cloud Shell (https://azure.microsoft.com/en-us/features/cloud-shell/)
https://shell.azure.com
MIT License
254 stars 103 forks source link

[BUG] When running import-module -name Microsoft.Graph.Users in cloud shell I get the error Assembly with same name is already loaded #396

Open dustypaulson opened 6 months ago

dustypaulson commented 6 months ago

To Reproduce

Run the command install-module Microsoft.Graph.Users Run the command import-module Microsoft.Graph.Users Error is produced

Commands you ran
install-module Microsoft.Graph.Users
import-module Microsoft.Graph.Users

## Observed Behavior
CMDlets in this module are not usable

Include error output here


Import-Module: Assembly with same name is already loaded

Get-MgUserLicenseDetail: The 'Get-MgUserLicenseDetail' 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'.

## Expected behavior
The ability to use the Users modules.

A clear description of what you expected to happen instead.

The ability to use  the Users modules.

## Is this specific to Cloud Shell?
Please verify if the same issue can be reproduced by running the same tool **outside Cloud Shell** - for example,
by installing it on your own computer. If so, it is likely to be a bug in that tool or in the Azure service it communicates with, 
not in Cloud Shell. Please file the issue with the appropriate project.

I can only repro this in cloud shell

## Interface information
How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
If a browser, which Operating System and browser are you using? (ex. Edge on Windows 10)

https://portal.azure.com,

## Additional context
Add any other context about the problem here.
It seems as though the Microsoft.Graph.Users.Actions and Microsoft.Graph.Users.Functions are interfering with the installation of the overall users modules. 

Below are all other Graph Modules installed:

Microsoft.Graph.Applications
Microsoft.Graph.Authentication
Microsoft.Graph.Groups   
Microsoft.Graph.Identity.Governance
Microsoft.Graph.Identity.SignIns
Microsoft.Graph.Users.Actions
Microsoft.Graph.Users.Functions 
Microsoft.Graph.Identity.DirectoryManagement
dustypaulson commented 5 months ago

Any updates would be appreciated!