
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
microsoft-intune
Advanced tools
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
await intune.devices.list()
await intune.devices.listAzureAdDevices()
await intune.deviceConfigurations.list()
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)
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)
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)
await intune.customRequest.get('/endpoint')
FAQs
sdk for Microsoft Intune
The npm package microsoft-intune receives a total of 1,166 weekly downloads. As such, microsoft-intune popularity was classified as popular.
We found that microsoft-intune demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.