Get-MgUser Method not found error
Hi,
Hope this is the correct forum for a question like this. If not, please let me know.
Just trying to learn Graph to do some basic Azure user account management. But right off the bat I’m running into an error I can’t seem to correct.
I connect to Graph using:
Connect-MgGraph -Scopes “User.ReadWrite.All”
The browser pops up and prompts me for credentials and I enter my global admin credentials.
Then I type:
Get-MgUser -All
And I get the following message:
Get-MgUser_List: Method not found: ‘System.Net.Http.HttpClient Microsoft.Graph.PowerShell.Authentication.Helpers.HttpHelpers.GetGraphHttpClient(Microsoft.Graph.PowerShell.Authentication.IAuthContext)’.
Odd thing is, yesterday this was working.
This is when trying to run this from Visual Studio Code. If I run it from the old PowerShell ISE, it works fine. But I read somewhere that Graph is best run from PowerShell 7, which is what is installed in my Visual Studio Code.
Any thoughts on this? Am I missing some kind of configuration setup in VSC?
Any help is greatly appreciated, thanks in advance!
Hi,Hope this is the correct forum for a question like this. If not, please let me know. Just trying to learn Graph to do some basic Azure user account management. But right off the bat I’m running into an error I can’t seem to correct. I connect to Graph using: Connect-MgGraph -Scopes “User.ReadWrite.All”The browser pops up and prompts me for credentials and I enter my global admin credentials. Then I type:Get-MgUser -All And I get the following message:Get-MgUser_List: Method not found: ‘System.Net.Http.HttpClient Microsoft.Graph.PowerShell.Authentication.Helpers.HttpHelpers.GetGraphHttpClient(Microsoft.Graph.PowerShell.Authentication.IAuthContext)’. Odd thing is, yesterday this was working. This is when trying to run this from Visual Studio Code. If I run it from the old PowerShell ISE, it works fine. But I read somewhere that Graph is best run from PowerShell 7, which is what is installed in my Visual Studio Code. Any thoughts on this? Am I missing some kind of configuration setup in VSC? Any help is greatly appreciated, thanks in advance! Read More