Jump to content

End of msol cmdlets - setting up MgGraph for Powershell commands


Recommended Posts

Posted

First time I have tried to manually license a new user using Powershell since September. It seems that MS have finally switched off the msol module - at least, I now just get an unspecified error. Great.

 

So, I want to license a M365 user using Powershell, and it looks like I need the MgGraph module now. I have the module installed, but I just get 403 errors when running commands.

 

Does anyone have any idea how I give myself permission to run the commands? The module has had access granted in Entra, but only read as that's what it asked for. Our Salamander install can do this, and I'll probably get it modified to do so, but I always did staff manually due to the faff of constantly coming and going supply teachers.

 

Anyone done this and got a decent guide? I have only found absolute junk online so far.

Posted

I've done it. It was to do with scopes - man, I read some absolute **** online to actually cut the junk out.

 

Connect-MgGraph -Scopes "User.Read.All","Group.ReadWrite.All","Directory.ReadWrite.All","Organization.ReadWrite.All"

 

Then authorise the app with Entra via the popup.

  • Thanks 1
Posted

Powershell for MSgraph seems a whole lot more complicated way of doing things.

I get the scopes intention but, yeah I had a lot of googling to find what i needed.

 

And some things still require the AzureAd module

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...