Install and connect the PowerShell tool
Install the open-source IntuneBrew PowerShell script, create an app registration, and connect it to your tenant.
The IntuneBrew PowerShell script uploads and updates apps from the same catalog as the web portal, from your own machine or an automation account. Use it when you want to script deployments, run them on a schedule, or deploy installers that are not in the catalog.
Requirements
-
PowerShell 7 or later. The script does not run in Windows PowerShell 5.1.
-
The Microsoft.Graph.Authentication module:
-
Network access to
raw.githubusercontent.com(catalog, app details and logos), the installer download hosts, Microsoft Graph, and Azure Storage (where Intune receives the upload). -
Either an Entra account that can manage Intune apps, or an app registration with the permissions below.
Install the script
From the PowerShell Gallery
Check the installed version with Get-InstalledScript IntuneBrew.
The Gallery can lag behind GitHub
The PowerShell Gallery currently has version 1.0.1. Several parameters on this site, such as -NonInteractive, -ScopeTagIds and -SecurityHoldLevel, are marked 1.1.0 and are only in the latest script on GitHub. Run Get-Help IntuneBrew -Full to see what your installed version supports.
From GitHub
Clone the repository, or download IntuneBrew.ps1 from it, and run the script directly:
Running from a clone is also what enables the vulnerability report and security update holds, which read the CVE folder of the repository.
On macOS
Install-Script puts the script in ~/.local/share/powershell/Scripts, which is not on your PATH. Either run it by its full path or add the folder to your PowerShell profile:
The interactive sign-in menu opens a Windows file picker for the configuration file. On macOS, always pass the file with -ConfigFile instead.
Choose how to sign in
When you run IntuneBrew without -ConfigFile, it asks how to connect:
| Method | Best for | Needs |
|---|---|---|
| Interactive session | Trying IntuneBrew, occasional manual runs | An account that can manage Intune apps |
| App registration with certificate | Scheduled or unattended runs | App registration, certificate in your certificate store |
| App registration with secret | Scheduled runs where a certificate is impractical | App registration, client secret |
Interactive session
Pick option 3 and sign in. IntuneBrew asks for the delegated permissions DeviceManagementApps.ReadWrite.All and Group.Read.All. If either is missing, it asks whether to continue anyway.
Create an app registration
- In the Entra admin center, go to Applications → App registrations → New registration.
- Name it, for example
IntuneBrew, choose Single tenant, and select Register. - Open API permissions → Add a permission → Microsoft Graph → Application permissions and add:
DeviceManagementApps.ReadWrite.All, to create and update appsGroup.Read.All, to read group names when IntuneBrew copies assignments
- Select Grant admin consent.
- Add a credential under Certificates & secrets, as described below.
IntuneBrew checks both permissions after connecting with an app registration and stops if one is missing.
Certificate
Create a certificate, export it, and upload the public key to the app registration under Certificates & secrets → Certificates:
The certificate must stay in the CurrentUser or LocalMachine store of the machine that runs IntuneBrew. The thumbprint is 40 hexadecimal characters with no spaces or colons.
Client secret
Create a secret under Certificates & secrets → Client secrets and copy its Value right away. IntuneBrew needs the value, not the secret ID. Note the expiry date; the script stops working when the secret expires.
Save a configuration file
Save the connection details as JSON and pass the file with -ConfigFile. The repository has templates for both kinds:
tenantIdmust be the tenant GUID, not a domain name. After signing in, IntuneBrew checks that it connected to that tenant and stops if it did not.clientIdis accepted instead ofappId.- You can add
"authMethod": "Certificate"or"authMethod": "ClientSecret". Without it, IntuneBrew picks the method from the fields you filled in.
Keep configuration files private
A configuration file with a client secret gives full app management access to your tenant. Restrict who can read it and never commit it to source control.
Then run, for example: