Skip to content

ahoog42/export-intune-apps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

export-intune-apps

A lightweight cli that extracts installed app from an Intune instance, enriches with metadata from the Apple App and Google Play Stores, and output the data in sqlite3, .csv and .json formats.

Features

  • Extracts installed applications from an Intune instance.
  • Enriches extracted data with metadata from the Apple App Store and Google Play Store.
  • Outputs data in multiple formats: SQLite3, CSV, and JSON.
  • Lightweight CLI built on Node.js for fast integration in various workflows.

Register an Azure AD app

Step 1: Register an App in Azure AD

  1. Go to Azure Portal.
  2. Navigate to Microsoft Entra Id > Manage > App registrations > New registration.
  3. Give it a name (e.g. Intune App Extract), and select the correct supported account types.
  4. Click Register

Step 2: After registering:

  1. Save Application (client) ID
  2. Save Directory (tenant) ID
  3. Client credentials > New Client secret and store it securely.

Step 3: Add API Permissions

  1. Go to Manage > API permissions for your app registration:
  2. Add permission: Microsoft Graph > Application permissions > Select permissions
  3. Add DeviceManagementApps.Read.All
  4. DeviceManagementManagedDevices.Read.All (optional for broader info)
  5. Click Add Permission
  6. Click "Grant admin consent for " and authorize the account

Installation

Prerequisites

  • Node.js (v18 or above)
  • Git

Setup Steps

Step 1. Clone the repository:

  git clone https://github.com/ahoog42/export-intune-apps.git
  cd export-intune-apps
  npm install

Step 2. Create an environment configuration file:

  1. Create a new .env file in the project root.
  2. Add the following variable:
CLIENT_SECRET=<your-client-secret>

Tip: you can also add TENANT_ID and CLIENT_ID to the .env so you don't have to add command line each time. The cli option provides a more scriptable interface and better support for multiple environments (e.g. test vs production)

Usage

You can run the cli as follows:

node intune-export.js --tenantId <your-tenant-id> --clientId <your-client-id>

If you want to populate app metadata from the Apple App or Google Play stores, add the --metadata switch:

node intune-export.js --metadata --tenantId <your-tenant-id> --clientId <your-client-id>

Usage help

Usage: intune-export [options]

Options:
  --tenantId <tenantId>  Azure Tenant ID
  --clientId <clientId>  Azure Client ID
  --debug                Enable debug logging
  --metadata             Enrich app metadata
  --output <filename>    Filename (default: "intune_apps")
  -h, --help             display help for command

Examples

Note: added --no-deprecation flag to node to supress deprecation notice

node --no-deprecation intune-export.js --metadata

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes and push the branch.
  4. Open a pull request.

License

This project is licensed under the MIT License.

About

small cli to export a list of mobile apps from Microsoft Intune

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors