# Install Microsoft Graph PowerShell SDK
Install-Module Microsoft.Graph.Authentication -Scope CurrentUser
# Download and run the script
.\IntuneAssignmentChecker_v2.ps1
Your Entra ID application registration needs these permissions: | Permission | Type | Description |
---|---|---|---|
User.Read.All | Application | Read all users' full profiles | |
Group.Read.All | Application | Read all groups | |
Device.Read.All | Application | Read all devices | |
DeviceManagementApps.Read.All | Application | Read Microsoft Intune apps | |
DeviceManagementConfiguration.Read.All | Application | Read Microsoft Intune device configuration and policies | |
DeviceManagementManagedDevices.Read.All | Application | Read Microsoft Intune devices |
Follow these steps if you want to use certificate authentication with an app registration:
Create an Entra ID App Registration:
Grant required Application permissions:
Create and configure certificate authentication:
# Create self-signed certificate
New-SelfSignedCertificate `
-Subject "CN=IntuneAssignmentChecker" `
-CertStoreLocation "cert:\CurrentUser\My" `
-NotAfter (Get-Date).AddYears(2) `
-KeySpec Signature `
-KeyExportPolicy Exportable
# Export the certificate
$cert = Get-ChildItem Cert:\CurrentUser\My | Where-Object {$_.Subject -like "*IntuneAssignmentChecker*"}
Export-Certificate -Cert $cert -FilePath "C:\temp\IntuneAssignmentChecker.cer"
Upload certificate to your app registration:
Configure the script with your app details:
# Update these values in the script
$appid = '<YourAppIdHere>' # Application (Client) ID
$tenantid = '<YourTenantIdHere>' # Directory (Tenant) ID
$certThumbprint = '<YourThumbprint>' # Certificate Thumbprint
If you prefer not to set up an app registration, you can use interactive authentication:
You can just run the script without any changes. It will ask if you want to use interactive authentication where you will type "y" and press enter.
This will prompt you to sign in with your credentials when running the script. The permissions will be based on your user account's roles and permissions in Entra ID.
Choose Certificate Authentication if you:
Choose Interactive Authentication if you:
Note: Keep your certificate and app credentials secure! Anyone with access to these can access your Intune environment with the configured permissions.
The script provides a comprehensive menu-driven interface with the following options:
Check User(s) Assignments
Check Group(s) Assignments
Check Device(s) Assignments
Show All Policies and Their Assignments
Show All 'All Users' Assignments
Show All 'All Devices' Assignments
Search for Assignments by Setting Name
Show Policies Without Assignments
Check for Empty Groups in Assignments
All operations support CSV export for detailed analysis and reporting.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.