npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

microsoft-intune

v2.11.0

Published

sdk for Microsoft Intune

Readme

Microsoft Intune SDK

Full Documentation

Getting Started

You can install the package with the following command:

npm install microsoft-intune
yarn add microsoft-intune

Import the package

import { Intune } from 'microsoft-intune'

Initialize with Client ID and Client Secret Auth:

  const intune = new Intune({
    authentication: {
      clientId: '',
      clientSecret: ''
    },
    tenantId: ''
  })

Optionally Pass a Refresh token to use refresh_token auth

 const intune = new Intune({
    authentication: {
      clientId: '',
      clientSecret: ''
      refreshToken: ''
    },
    tenantId: ''
  })

Updated refreshToken from Microsoft can be accessed from:

intune.refreshToken

Example Usage

Get all Intune Devices

await intune.devices.list()

Get all AzureAd Devices

await intune.devices.listAzureAdDevices()

Get all Device Configurations

await intune.deviceConfigurations.list()

Create Device Configuration

const deviceConfiguration = {
  "@odata.type": "#microsoft.graph.windows10GeneralConfiguration",
  "description": "Disables sleep when lid is closed",
  "displayName": "Power - Disable Sleep for Lid Close",
  "powerLidCloseActionPluggedIn": "noAction"
}

await intune.deviceConfigurations.create(deviceConfiguration)

Create Office Suite App

const officeApp = { 
  "@odata.type": "#microsoft.graph.officeSuiteApp",
  "displayName": "Office 365",
  "description": "Office 365 for Windows 10",
  "publisher": "Microsoft",
  "largeIcon": null,
  "isFeatured": true,
  "privacyInformationUrl": "https://privacy.microsoft.com/en-US/privacystatement",
  "informationUrl": "https://products.office.com/en-us/explore-office-for-home",
  "owner": "Microsoft",
  "developer": "Microsoft",
  "notes": "",
  "roleScopeTagIds": [],
  "autoAcceptEula": true,
  "productIds": [
    "o365ProPlusRetail"
  ],
  "useSharedComputerActivation": false,
  "updateChannel": "deferred",
  "officePlatformArchitecture": "x64",
  "localesToInstall": [],
  "installProgressDisplayLevel": "none",
  "shouldUninstallOlderVersionsOfOffice": true,
  "targetVersion": "",
  "updateVersion": "",
  "officeConfigurationXml": null,
  "excludedApps": {
    "access": true,
    "excel": false,
    "groove": true,
    "infoPath": true,
    "lync": true,
    "oneDrive": true,
    "oneNote": false,
    "outlook": false,
    "powerPoint": false,
    "publisher": true,
    "sharePointDesigner": true,
    "teams": true,
    "visio": true,
    "word": false
  }
}

await intune.mobileApps.create(officeApp)

Create and Upload Win32 App from Stream

This function requires the mobileApp Info, fileEncryptionInfo, mobileAppContentFile, and the unencrypted .intunewin file . Some info for these objects is found in the detection.xml that's located in the extracted .intunewin file.

const mobileApp = {
  '@odata.type': '#microsoft.graph.win32LobApp',
  displayName: 'App',
  description: '',
  publisher: 'Publisher',
  isFeatured: true,
  privacyInformationUrl: '',
  informationUrl: null,
  owner: '',
  developer: '',
  notes: '',
  fileName: 'app.intunewin',
  installCommandLine: 'install.cmd',
  uninstallCommandLine: 'uninstall.cmd',
  applicableArchitectures: 'x64',
  minimumFreeDiskSpaceInMB: null,
  minimumMemoryInMB: null,
  minimumNumberOfProcessors: null,
  minimumCpuSpeedInMHz: null,
  msiInformation: null,
  setupFilePath: 'app.exe',
  largeIcon: {
    type: 'image/png',
    value: 'keejejejejenenbejdejdn...'
  },
  minimumSupportedOperatingSystem: {
    v8_0: false,
    v8_1: false,
    v10_0: false,
    v10_1607: true,
    v10_1703: false,
    v10_1709: false,
    v10_1803: false,
    v10_1809: false,
    v10_1903: false
  },
  detectionRules: [
    {
      '@odata.type': '#microsoft.graph.win32LobAppFileSystemDetection',
      path: '%ProgramFiles%\\App',
      fileOrFolderName: 'App.exe',
      check32BitOn64System: false,
      detectionType: 'exists',
      operator: 'notConfigured',
      detectionValue: null
    }
  ],
  requirementRules: [],
  installExperience: {
    runAsAccount: 'system',
    deviceRestartBehavior: 'suppress'
  },
  returnCodes: [
    {
      returnCode: 0,
      type: 'success'
    },
    {
      returnCode: 1,
      type: 'failed'
    }
  ]
}

const fileEncryptionInfo = {
    fileDigestAlgorithm: 'SHA256',
    encryptionKey: 'BKu4^YNmrrfG74yT3R&qAly',
    initializationVector: 'BKu4^YNmrrfG74yT3R&qAly',
    fileDigest: 'BKu4^YNmrrfG74yT3R&qAly',
    mac: 'BKu4^YNmrrfG74yT3R&qAly',
    profileIdentifier: 'ProfileVersion1',
    macKey: 'BKu4^YNmrrfG74yT3R&qAly'
  }

const mobileAppContentFile = {
  '@odata.type': '#microsoft.graph.mobileAppContentFile',
  manifest: null,
  size: 3332,
  name: 'app.intunewin',
  sizeEncrypted: 3993,
  isDependency: false
}

await intune.createWin32LobApp(mobileApp, fileEncryptionInfo, mobileAppContentFile, unencryptedFile) 

Custom Request

await intune.customRequest.get('/endpoint')