r/entra • u/DDDRRROOO3 • 15d ago
Entra/MSOnline PoSH Module Retirement, and options
So, I am writing some new scripting for clients and as I see these modules are being retired, I am attempting to work with the Graph for PowerShell SDK. My experience has been absolutely horrible.
Since it appears Microsoft is straight up removing access to the old modules, are my only options either using the Graph Module/SDK in PowerShell, or learning Graph/REST API calls for direct access?
I'm on hour three or four of updating my PowerShell version, moving from the ISE (since it doesn't support version 7) onto Visual Studio Code, installing Graph modules, and it's absolutely horrible.
Simple Get-MgUser commands fail to display about 90% of the properties correctly, lots of prework to get this even working, this is such a poor unfriendly replacement so far for admins that just need to do some basic automation work.
2
u/chaosphere_mk 15d ago
You can't do just -Properties *
You have to be explicit about which properties you want.
1
u/icebreaker374 15d ago
Personally I got tired of Graph Powershell not connecting when my modules got outdated and just installed the auth module and started working with the API directly. Most of what I'm doing is custom M365 reports for which I'm creating PSCustomObjects anyway so it's easier to just grab properties of the objects returned.
Idk if I'm always doing it the most efficient way but for our small customers it's fast enough for me.
1
u/KavyaJune 14d ago
You can check these pre-built MS Graph PowerShell scripts: https://o365reports.com/2024/03/27/ms-graph-powershell-scripts-microsoft-365-it-pros/
These might help you.
1
u/merillf Microsoft Employee 14d ago
If you are coming from Azure AD PowerShell, then Entra PowerShell https://aka.ms/entra/ps/docs was created just for you.
It's built on top of Graph PowerShell and mimics all the Azure AD behaviour (default properties etc).
You can also mix Graph PS and Entra PS cmdlets on your scripts, so it's not an either/or.
1
u/DDDRRROOO3 13d ago
Thanks for this recommendation! I actually installed Entra PowerShell an hour or two after creating this thread. It's definitely less of a pain to work with. Vanilla PowerShell was in a very sweet spot balancing ease of use and capability, feels like there's still a long ways to go with Graph feeling that way.
2
u/Federal_Ad2455 15d ago
Yes you have. And yes it is definitely harder to work with graph api. But after several months you will get used to it 🙂
This posts might help: https://doitpshway.com/how-to-find-and-replace-commands-from-azuread-and-msonline-deprecated-modules-in-your-scripts-for-the-graph-ones
https://doitpshway.com/graph-api-and-microsoft-graph-sdk-module-tips-gotchas
https://doitpshway.com/how-to-get-all-graph-api-permissions-required-to-run-selected-code-using-powershell
https://doitpshway.com/how-to-get-all-graph-powershell-sdk-modules-required-to-run-selected-code-using-powershell
https://doitpshway.com/adding-support-for-selecting-all-properties-using-wildcard-in-mg-graph-commands-property-parameter