Collection of Graph scripts, tools, notes, etc.
Use an app registration to with required permissions to Include/Exclude and deploy Available/Required Intune apps by Group
.\Assign-ManagedApps.ps1 -GroupPrefix "All Users" -Intent "Available" -iOs .\Assign-ManagedApps.ps1 -GroupPrefix "Intune-" -Intent "Required" -iOs .\Assign-ManagedApps.ps1 -GroupPrefix "Intune-" -Intent "Required" -Windowsgit clone https://github.com/Micke-K/IntuneManagement
cd .\IntuneManagement
$tenant = Read-Host -Prompt "Enter Tenant ID" -AsSecureString
$appId = Read-Host -Prompt "Enter App ID" -AsSecureString
$secret = Read-Host -Prompt "Enter Secret" -AsSecureString
$tenantPlainText = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($tenant))
$appIdPlainText = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($appId))
$secretPlainText = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secret))
# Start the script with plain text credentials
.\Start-IntuneManagement.ps1 -Tenant $tenantPlainText -AppId $appIdPlainText -Secret $secretPlainText