After Microsoft announced the deprecation of PowerShell modules, such as Azure AD and MS Online, the MS Graph PowerShell modules gained attention from admins. However, the Microsoft Graph module might not provide all the necessary attribute values or properties. So, admins utilize the beta profile of the PowerShell module to fulfill them. But, with the Graph PowerShell module’s update to version 2.0, Microsoft separated the beta from the standard one and launched it as a separate module called Microsoft Graph beta. Let’s explore the detailed process to install Microsoft Graph beta module in Windows PowerShell.
As a Microsoft 365 admin, you’re probably familiar with the significance of Microsoft Graph in managing your organization’s data and resources efficiently. However, did you know there’s even more to explore with the beta version?
Let’s take a practical example: When using the “Get-MgUser” cmdlet in MS Graph PowerShell, you can effortlessly retrieve user details. Yet, for certain critical properties like ‘UserType‘, ‘AccountType‘, and ‘AssignedLicense‘, there’s a slight twist – you require the beta module.
You might be wondering, “Why should I opt for the beta module when I can switch to the beta profile?”
However, the crucial answer lies in the fact that you need to install Microsoft Graph beta module for the following reasons.
- When you upgrade your MS Graph PowerShell module to version 2.0 or later, attempting to use the “Select-MGProfile Beta” cmdlet will result in displaying an error message stating “the term select mgprofile is not recognized“. To overcome this, you have to install a separate module for the beta version.
- By default, during the installation of Graph PowerShell for the first time, the latest version is usually installed. In such cases, you need to install the Microsoft Graph beta module to access beta capabilities.
- Additionally, with the beta module’s installation, you can effortlessly access the beta features, making it easier compared to switching to the beta profile each time. In this scenario, you can install and work with the beta module without updating the existing standard Graph module.
You can install Microsoft Graph beta module for the currently logged-in user by running the below cmdlet in Windows PowerShell. This installs the latest version, if you want to install it with the specific Microsoft Graph beta version use the ‘RequiredVersion’ parameter.
Install-Module Microsoft.Graph.Beta -Scope CurrentUser
It asks for confirmation to install modules from an untrusted repository, select yes to continue.
You can also change the scope of the installation to “AllUsers” using the “Scope” parameter as described in the below cmdlet. Execution of the below cmdlet requires admin permissions (PowerShell- Run as administrator).
Install-Module Microsoft.Graph.Beta -Scope AllUsers
Note: It is recommended to use Windows PowerShell with version 7 or later.
First, you have to connect Microsoft Graph PowerShell to experience the beta features and benefits.
After connection, it is necessary to use the prefix “Beta” with cmdlets that utilize the beta module.
For example, “Get-MgBetaUser” instead of “Get-MgUser” and “Get-MgBetaGroup” instead of “Get-MgGroup”.
If you already have installed the PowerShell beta module and wish to update it to the latest version, use the following cmdlet.
Note: Updating the older Graph PowerShell module to the latest version doesn’t install or update the beta module. You need to follow the separate procedure for Microsoft Graph beta module.
To uninstall Microsoft Graph beta module, you can make use of the below cmdlet.
Uninstall-Module Microsoft.Graph.Beta -AllVersions
To remove all the dependency modules of the Microsoft Graph beta, run the following command.
Get-InstalledModule Microsoft.Graph.Beta* | Uninstall-Module
Even though the beta module of MS Graph helps the admins, Microsoft recommends the stable version of MS Graph for writing scripts. It should be noted that the Microsoft Graph beta endpoint is still in preview and subject to change.
Amongst the limitations of the Graph PowerShell module, Graph beta emerged as a lifesaver. Despite complementing the Microsoft 365 productivity flow Microsoft Graph, using them can still be challenging and cumbersome. If you are also thinking so, don’t worry! You are so near to the solution.
Yeah, AdminDroid Microsoft 365 reporting tool lets you visualize reports on all Microsoft 365 services with advanced GUI. With the enhanced capability of this reporting tool, you can get reports with the following benefits.
- Birds Eyesight on Entire Microsoft 365 Organization
- 1800+ Prebuild Reports and 30+Dashboards
- User Customizable Reports
- Granular Delegation of Reports
- Advanced Scheduling of Reports
- Activities Track with Real Time Alerts
- Lifetime Free Azure AD (190+) Reports
- 15 days Free Premium Edition
- Free Demo of all Available Reports
In addition, AdminDroid provides precise details on all audit activities across Microsoft 365 services which helps you to identify every bit of detail. Ensure proactive monitoring and stay updated on organizational changes with AdminDroid’s Microsoft 365 auditing.
Explore the AdminDroid demo now and see how it can help you in Microsoft 365 management!
With this blog, I hope you have gained a clear understanding of the Microsoft Graph PowerShell beta module and successfully installed it. Let’s know your queries and feedback through the comment section.