Authentication Methods
Interactive Browser (Default)
Best for: Daily use by administrators on their workstation Interactive authentication opens a browser window where you sign in with your Azure AD credentials. The app uses Azure.Identity’sInteractiveBrowserCredential with persistent token caching.
Features:
- Multi-factor authentication (MFA) support
- Conditional Access policy enforcement
- Token refresh handled automatically
- Tokens cached locally for seamless re-authentication
Select Interactive auth method
On the login screen, ensure Auth Method is set to “Interactive” (default).
Grant consent
If this is your first time, you’ll be asked to grant consent for the requested Graph API permissions.
The redirect URI
http://localhost:45132 must be registered in your Azure AD app registration as a “Mobile and desktop application” platform.Client Secret
Best for: Unattended automation scenarios (scheduled reports, CI/CD pipelines) Client Secret authentication uses a service principal with a pre-shared secret. No user interaction is required.Device Code Flow
Best for: Headless environments, macOS (due to Avalonia browser limitations) Device Code flow displays a code that you enter on another device to complete authentication.Click Login
The app displays:
- A user code (e.g.,
ABCD1234) - A verification URL (e.g.,
https://microsoft.com/devicelogin)
Complete sign-in on another device
Open the verification URL in a browser, enter the code, and sign in with your Azure AD account.
macOS users currently require Device Code flow due to Avalonia UI limitations preventing the interactive browser popup.
App Registration Setup
Before using Intune Commander, you must create an Azure AD app registration with the required permissions.Configure platform
Under Authentication:
- Add a “Mobile and desktop applications” platform
- Set redirect URI to
http://localhost:45132
Add API permissions
Under API permissions, add Microsoft Graph delegated permissions:
DeviceManagementConfiguration.ReadWrite.AllDeviceManagementApps.ReadWrite.AllDeviceManagementServiceConfig.ReadWrite.AllDeviceManagementManagedDevices.ReadWrite.AllDirectory.Read.AllPolicy.Read.AllPolicy.ReadWrite.ConditionalAccess
docs/GRAPH-PERMISSIONS.md in the source repository.Token Caching
Interactive and Device Code authentication use Azure.Identity’s built-in token cache:- Location:
%LocalAppData%/.IdentityService(Windows) - Encryption: DPAPI-encrypted per-user
- Refresh: Tokens are automatically refreshed when expired
- Persistence: Tokens persist across app restarts
Client Secret authentication does not use persistent token caching; tokens are acquired on-demand for each Graph API call.
Multi-Cloud Authentication
Each cloud environment uses different Azure AD and Graph API endpoints:| Cloud | Authority Endpoint | Graph Endpoint |
|---|---|---|
| Commercial | https://login.microsoftonline.com | https://graph.microsoft.com |
| GCC | https://login.microsoftonline.com | https://graph.microsoft.com |
| GCC-High | https://login.microsoftonline.us | https://graph.microsoft.us |
| DoD | https://login.microsoftonline.us | https://dod-graph.microsoft.us |
Verifying Permissions
After authenticating, Intune Commander can verify that your access token contains all required Microsoft Graph permissions.Permissions Window
Access Tools → Check Permissions to open the Permissions Window: What it shows:- Required Permissions — All Graph permissions needed by Intune Commander (60+ scopes)
- Granted Permissions — Permissions present in your current access token (green checkmarks)
- Missing Permissions — Required permissions absent from the token (red X marks)
- Extra Permissions — Non-required permissions in your token (informational)
- Claim Source — Shows whether token is delegated (
scpclaim) or application (rolesclaim)
- All Granted (✓)
- Missing Permissions (✗)
All required permissions are present in the access token. Intune Commander has full functionality.
- Green summary banner
- All checkboxes marked
- No action required
- Interactive Browser / Device Code → Delegated token (
scpclaim)- Permissions scoped to user’s rights
- Admin consent still required for sensitive scopes
- Client Secret → Application token (
rolesclaim)- Permissions apply to service principal
- Requires Application permissions (not Delegated)
The Permissions Window uses
PermissionCheckService to decode the JWT access token and compare the scp or roles claim against the required permission list defined in GRAPH-PERMISSIONS.md.When to Use Permission Checks
- After initial app registration — Verify all permissions were added correctly
- When features fail — Diagnose “Forbidden” or “Insufficient privileges” errors
- After permission changes — Confirm new permissions are in the token
- Multi-cloud setup — Verify government cloud app registrations have correct scopes
Troubleshooting Authentication
Browser doesn’t open (Interactive)
Cause: Firewall blocking localhost or browser not registered Solution:- Check that
http://localhost:45132is not blocked by firewall - Try Device Code flow as an alternative
”Insufficient privileges” error
Cause: Missing Graph API permissions or admin consent not granted Solution:- Verify all required permissions are added to the app registration
- Ensure Grant admin consent was clicked
- Ask your Azure AD admin to grant consent
Token cache errors
Cause: Corrupted token cache file Solution:- Delete
%LocalAppData%/.IdentityServicefolder - Re-authenticate
GCC-High/DoD connection fails
Cause: Using a Commercial tenant app registration Solution:- Create a new app registration in the government cloud portal
- Update your profile with the new Client ID