How to Install PowerShell SDK for Microsoft Intune Graph API

Microsoft is deprecating the Azure AD PowerShell Module and MS Online module in 2022. So, admin need to migrate to either PowerShell SDK for Microsoft Intune Graph API or Microsoft Graph API. Let’s see how we can install PowerShell SDK for Microsoft Intune Graph API from PowerShell Gallery.

How to Install Microsoft Intune Graph API

To install PowerShell module for Intune Graph API, open PowerShell with admin privilege’s and run below command.

Install-Module -Name Microsoft.Graph.Intune

Once you have installed it, you can verify the installation using below command.

Get-InstalledModule -name Microsoft.Graph.Intune

PowerShell Get-InstalledModule Microsoft Intune Graph API

Now you need to connect with MSGraph using admin consent. The admin consent is required for first time connect only.

Connect-MSGraph -AdminConsent

This will ask for permission similar to any other Graph/ REST application when you connect to O365.

Connect_MSGraph Sign-in Prompt

The next screen “Permission requested. Review for your organization” list all permissions which are required for Graph API to work. Review the permissions and click on Accept to go ahead.

MSGraph - Intune - Admin Consent

For subsequent usage, you can simply Connect-MSGraph without any parameters

Connect-MSGraph

Once connected, you will see the user name and Tenant ID you connected with.

Connect-MSGraph Intune

Now you can run the commands which are available such as list of all managed devices can be retrieved using Get-IntuneManagedDevice command.

Cisco CCNA Certification Exam Dumps

Get-IntuneManagedDevice

Related Posts

Subscribe to Techuisitive Newsletter

Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.


Scroll to Top