Forum Discussion

midiman810new's avatar
midiman810new
Brass Contributor
Oct 29, 2026

What do I use to Connect to M365 and manage my users

Hi, 

What do I use now to manage my users in M365? 

I used to log in with MSOnline and run my scripts in the ISE. 

 

But now it appears that everything has changed and I can no longer use my old scripts.

I need to sign into my tenant and amends my users details. 

 

What do I need to do. 

 

Thanks  

 

 

1 Reply

  • Microsoft Graph PowerShell is the supported replacement for your MSOnline user-management scripts. Changing the login command alone is insufficient because cmdlet names, parameters and returned properties also differ. Start in PowerShell 7, which Microsoft recommends, rather than rebuilding the workflow around ISE. Install the user module with Install-Module Microsoft.Graph.Users -Scope CurrentUser. Connect using Connect-MgGraph -TenantId '<tenant-id>' -Scopes 'User.ReadUpdate.All'. Have an administrator approve the required consent, and use an account with an appropriate user-management role. Test Get-MgUser against one ordinary test account before changing anything. For example, Update-MgUser -UserId '<user-id>' -Department 'Finance' updates its department; read the property back to verify the result. Map each existing Msol command and parameter individually before running bulk changes. If an account is synchronized from on-premises Active Directory, check the source of authority for the property before attempting its cloud update.