Thomas Hellingman Active Directory,Azure,Azure AD,Endpoint Manager,Intune,Microsoft,Office 365,PowerShell Connect to Azure AD, MSOnline or Intune API with PowerShell

Connect to Azure AD, MSOnline or Intune API with PowerShell

How to connect to Microsoft Azure Active Directory, Microsoft 365 or the Intune API through Microsoft Graph with PowerShell.

# Get the admin credentials:
$AzureAdCred = Get-Credential
# Azure Active Directory PowerShell for Graph module
Find-Module -Name AzureAD | Install-Module
Import-Module AzureAD
Connect-AzureAD -Credential $AzureAdCred
Find-Module -Name MSOnline | Install-Module
Import-Module MSOnline
Connect-MsolService -Credential $AzureAdCred
Find-Module -Name Microsoft.Graph.Intune | Install-Module
Connect-MSGraph -Credential $AzureAdCred

Related Post

Azure Active Directory / Intune – Dynamic Group Membership RulesAzure Active Directory / Intune – Dynamic Group Membership Rules

Android Enterprise Corporate Owned Dedicated Devices / Corporate Owned Single Use (COSU) Group Name: “Intune Devices Android COSU”Query: (device.deviceOSType -eq “AndroidEnterprise”) and (device.deviceOwnership -eq “Company”) and (device.enrollmentProfileName -ne null)