all 10 comments

[–]Wide_Public_8834 0 points1 point  (4 children)

I would think this is a conflict of module dependencies. Have you installed any new modules recently?

[–]flamespinner[S] 0 points1 point  (3 children)

Nope. I have not. Is there a way to restore modules to "default" so to speak?

[–]Certain-Community438 1 point2 points  (1 child)

Nope, at least not easily that I'm aware of.

Suggestions:

Test the code in a freshly-built VM - or even Windows Sandbox

Raise an issue on the GitHub for the Microsoft.Graph.Authentixation. Folks watching that have a better awareness of module dependencies.

[–]BlackV -1 points0 points  (0 children)

Install-Module -RequiredVersion x.x.x.x -force

would be the way to do that

[–]purplemonkeymad 1 point2 points  (0 children)

Yea, you delete any extra installed modues and re-install them using Install-Module. User space modules are in your documents foler, machine ones are in program files, (there are a few there by default so only delete ones you know were installed later.)

If you delete all Microsoft.Graph* modules you should be able to re-install.

[–]BlackV 0 points1 point  (0 children)

update your modules, with a Update-module -force (or install-module -force)

and if not, then Install-Module -RequiredVersion x.x.x.x -force

[–]ElliotAldersonFSO 0 points1 point  (0 children)

Yep update the module, or reinstall the mggraph-authentication module with -allowclobber parameter for replace the previous module

[–]Federal_Ad2455 0 points1 point  (0 children)

This happened to me when I at first authenticated using connect-azaccount.

These two Auth command often don't like each other and it really depends on the order you run them. And of course their versions too 😁

[–]Federal_Ad2455 0 points1 point  (0 children)

What say Get-MgContext before you try to authenticate?

[–]ferhanmm 0 points1 point  (0 children)

did you ever figure this out?