CSM for Intune Detection Rules

If you are uploading an application with custom detection method, you have multiple different options for the detection method. Detection method is in json format and you need to use the format as specified in our examples. You can set detection method with following types:

  • Windows Installer
  • File and folder
  • Registry

Windows installer

Modifiable values:

  • productVersionOperator
    • notConfigured, equal, notEqual, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual
    • The operator to detect product version.
  • productCode
    • String value
    • Product code of the Windows installer
  • productVersion
    • String value
    • Value of the Windows installer

Example 1 - Windows installer product code

[{
    "@odata.type": "#microsoft.graph.win32LobAppProductCodeDetection",
    "productVersionOperator": "notConfigured",
    "productCode": "{57F514A0-50E6-463B-A1CB-F173B336F689}",
    "productVersion": "5.5.7"
}]

Example 2 - Windows installer product code with specific version

[{
    "@odata.type": "#microsoft.graph.win32LobAppProductCodeDetection",
    "productVersionOperator": "equal",
    "productCode": "{57F514A0-50E6-463B-A1CB-F173B336F689}",
    "productVersion": "5.5.7"
}]


File and folder

Modifiable values:

  • path
    • String value
    • Path to a folder containing the target file or folder. Use two backslash to differentiate folders
  • fileOrFolderName
    • String value
    • Name of the target file or folder
  • check32BitOn64System
    • true, false
    • A value indicating whether this file or folder is for checking 32-bit app on 64-bit system
  • detectionType
    • notConfigured, exists, modifiedDate, createdDate, version, sizeInMB, doesNotExist
    • The file system detection type
  • operator
    • notConfigured, equal, notEqual, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual
    • The operator to detect product version.
  • detectionValue
    • Value of the detection type

Example 1 - Folder exists

[{
    "@odata.type": "#microsoft.graph.win32LobAppFileSystemDetection",
    "path": "C:\\Program Files\\Google\\Drive File Stream",
    "fileOrFolderName": "54.0.3.0",
    "check32BitOn64System": false,
    "detectionType": "exists",
    "operator": "notConfigured",
    "detectionValue": "null"
 }]

Example 2 - File version

[{
    "@odata.type": "#microsoft.graph.win32LobAppFileSystemDetection",
    "path": "C:\\Program Files\\Google\\Drive File Stream\\54.0.3.0",
    "fileOrFolderName": "GoogleDriveFS.exe",
    "check32BitOn64System": false,
    "detectionType": "version",
    "operator": "equal",
    "detectionValue": "54.0.3.0"
}]


Registry 

Modifiable values:

  • check32BitOn64System
    • true, false
    • A value indicating whether this registry path is for checking 32-bit app on 64-bit system
  • keyPath
    • String value
    • Path to a target registry key 
  • valueName
    • String value
    • The target registry value name
  • detectionType
    • notConfigured, exists, modifiedDate, createdDate, version, sizeInMB, doesNotExist
    • The registry data detection type
  • operator
    • notConfigured, equal, notEqual, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual
    • The operator for registry data detection
  • detectionValue
    • The registry detection value

Example 1 - Registry string value 

[{
    "@odata.type": "#microsoft.graph.win32LobAppRegistryDetection",
    "check32BitOn64System": false,
    "keyPath": "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\O365ProPlusRetail - en-us",
    "valueName": "DisplayVersion",
    "detectionType": "string",
    "operator": "greaterThanOrEqual",
    "detectionValue": "16.0.14931.20132"
}]

Example 2 - Registry value exists

[{
    "@odata.type": "#microsoft.graph.win32LobAppRegistryDetection",
    "check32BitOn64System": false,
    "keyPath": "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\O365ProPlusRetail - en-us",
    "valueName": "DisplayVersion",
    "detectionType": "exists",
    "operator": "notConfigured",
    "detectionValue": "null"
}]