Bulk create Intune mobile app deployment groups and assignments

less than 1 minute read

Creating assignments and software deployment groups for Intune mobile apps is quite a repetitive and manual task. Because of that, I want to share a PowerShell script with you which allows you to automatically create software deployment groups in Azure AD and the assignments for various intents.

The script allows you to:

  • Create Azure AD groups (install uninstall purpose)
    • Pick existing groups based on displayName
  • Assign Intune mobile apps (tested for Win32 and MSI LOB apps)

Script in Action

You can find the script on my techblog GitHub repository.

Because of the configurable group prefixes the script helps you to keep your Intune environment clean and implement a standard app assignment configuration.

The script uses the Microsoft Graph API and the following resources

  • https://graph.microsoft.com/beta/deviceAppmanagement/mobileApps
  • https://graph.microsoft.com/beta/deviceAppmanagement/mobileApps/{AppID}/Assignments
  • https://graph.microsoft.com/beta/groups

It uses the preregistered app “Microsoft Intune PowerShell” which exists by default in all tenants. If you want to run the Script with PowerShell 7 you need to create an adjust the MSAL token section with the -DeviceCode parameter.

You can bulk select the apps you want to create the assignment and AAD deployment groups:

App assignment

Hope this saves you some time.

Comments