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
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.
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.
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.
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
Related Posts
- Get AAD Group Members Details Using PowerShell SDK for Microsoft Intune Graph API
- How To Export Serial number of Multiple Devices using PowerShell SDK for Intune Graph API
- Install PowerShell SDK for Microsoft Intune Graph API
- How to Export Managed Device Details from Intune
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.