2025-01-24 (Updated)
Installation via Intune was failing with the following error:
ERROR: Installation failed - The property 'BaseAddress' cannot be found on this object. Verify that the property exists
The Install-Client-Intune.ps1 script was using incorrect JSON paths when configuring appsettings.json:
WRONG (Before Fix):
# Missing SecureBootWatcher parent object!
$config.Sinks.WebApi.BaseAddress = $ApiBaseUrl
$config.Sinks.EnableWebApi = $trueProblem: The Sinks object is under SecureBootWatcher, not at the root level.
Updated the script to use correct JSON paths:
CORRECT (After Fix):
# FIX: Correct JSON path - SecureBootWatcher.Sinks.WebApi.BaseAddress
$config.SecureBootWatcher.Sinks.WebApi.BaseAddress = $ApiBaseUrl
$config.SecureBootWatcher.Sinks.EnableWebApi = $true
# FleetId is correctly under SecureBootWatcher
$config.SecureBootWatcher.FleetId = $FleetIdFor reference, here is the actual structure:
{
"Logging": { ... },
"SecureBootWatcher": { // ? Parent object
"FleetId": "mslabs", // ? Correct path: SecureBootWatcher.FleetId
"RunMode": "Once",
"Sinks": { // ? Sinks is UNDER SecureBootWatcher!
"ExecutionStrategy": "StopOnFirstSuccess",
"EnableWebApi": true, // ? Correct path: SecureBootWatcher.Sinks.EnableWebApi
"WebApi": {
"BaseAddress": "https://...", // ? Correct path: SecureBootWatcher.Sinks.WebApi.BaseAddress
"IngestionRoute": "/api/SecureBootReports",
"HttpTimeout": "00:00:30"
},
"EnableAzureQueue": true,
...
},
"ClientUpdate": { ... },
"Commands": { ... }
}
}Correct Paths:
- ? Fleet ID:
SecureBootWatcher.FleetId - ? Web API Enabled:
SecureBootWatcher.Sinks.EnableWebApi - ? Base Address:
SecureBootWatcher.Sinks.WebApi.BaseAddress - ? Ingestion Route:
SecureBootWatcher.Sinks.WebApi.IngestionRoute
Incorrect Paths (OLD):
- ?
Sinks.WebApi.BaseAddress- MissingSecureBootWatcherparent - ?
Sinks.EnableWebApi- MissingSecureBootWatcherparent
scripts/Install-Client-Intune.ps1
Lines ~139-149 (approximate):
Before (WRONG):
if (-not [string]::IsNullOrEmpty($ApiBaseUrl)) {
Write-InstallLog "Configure WebApi $ApiBaseUrl"
# WRONG: Missing SecureBootWatcher parent
$config.Sinks.WebApi.BaseAddress = $ApiBaseUrl
$config.Sinks.EnableWebApi = $true
Write-InstallLog "Set API Base URL: $ApiBaseUrl"
}
if (-not [string]::IsNullOrEmpty($FleetId)) {
$config.SecureBootWatcher.FleetId = $FleetId
Write-InstallLog "Set Fleet ID: $FleetId"
}After (CORRECT):
if (-not [string]::IsNullOrEmpty($ApiBaseUrl)) {
Write-InstallLog "Configure WebApi $ApiBaseUrl"
# FIX: Correct JSON path - SecureBootWatcher.Sinks.WebApi.BaseAddress
$config.SecureBootWatcher.Sinks.WebApi.BaseAddress = $ApiBaseUrl
$config.SecureBootWatcher.Sinks.EnableWebApi = $true
Write-InstallLog "Set API Base URL: $ApiBaseUrl"
}
if (-not [string]::IsNullOrEmpty($FleetId)) {
# Correct JSON path - SecureBootWatcher.FleetId
$config.SecureBootWatcher.FleetId = $FleetId
Write-InstallLog "Set Fleet ID: $FleetId"
}Run this PowerShell command to verify the structure:
# Verify Sinks is under SecureBootWatcher
Get-Content "SecureBootWatcher.Client\appsettings.json" -Raw | `
ConvertFrom-Json | `
Select-Object -ExpandProperty SecureBootWatcher | `
Select-Object -ExpandProperty Sinks | `
ConvertTo-Json -Depth 2Output shows that Sinks is indeed under SecureBootWatcher! ?
Created scripts/Test-AppsettingsJsonPath.ps1 to verify the fix.
Run Test:
.\scripts\Test-AppsettingsJsonPath.ps1Expected Output:
Testing appsettings.json configuration paths
Current JSON structure:
SecureBootWatcher.FleetId = mslabs
SecureBootWatcher.Sinks.WebApi.BaseAddress = https://SRVCM00.MSINTUNE.LAB:5001
SecureBootWatcher.Sinks.EnableWebApi = True
Test: Setting configuration values
Setting: $config.SecureBootWatcher.Sinks.WebApi.BaseAddress = 'https://newapi.contoso.com'
Setting: $config.SecureBootWatcher.Sinks.EnableWebApi = $true
Setting: $config.SecureBootWatcher.FleetId = 'test-fleet'
Result: SUCCESS ?
Verification:
SecureBootWatcher.FleetId = test-fleet
SecureBootWatcher.Sinks.WebApi.BaseAddress = https://newapi.contoso.com
SecureBootWatcher.Sinks.EnableWebApi = True
========================================
ALL TESTS PASSED ?
========================================
Summary:
? Correct path for BaseAddress: $config.SecureBootWatcher.Sinks.WebApi.BaseAddress
? Correct path for EnableWebApi: $config.SecureBootWatcher.Sinks.EnableWebApi
? Correct path for FleetId: $config.SecureBootWatcher.FleetId
# Test install script with parameters
.\scripts\Install-Client-Intune.ps1 `
-ApiBaseUrl "https://test-api.contoso.com:5001" `
-FleetId "test-fleet"
# Verify configuration
$config = Get-Content "C:\Program Files\SecureBootWatcher\appsettings.json" -Raw | ConvertFrom-Json
Write-Host "BaseAddress: $($config.SecureBootWatcher.Sinks.WebApi.BaseAddress)"
Write-Host "FleetId: $($config.SecureBootWatcher.FleetId)"Expected Output:
BaseAddress: https://test-api.contoso.com:5001
FleetId: test-fleet
- ? Installation fails with "BaseAddress cannot be found" error
- ? Intune deployment broken
- ? Client cannot connect to API
- ? Manual intervention required
- ? Installation succeeds
- ? BaseAddress configured correctly
- ? EnableWebApi configured correctly
- ? FleetId configured correctly
- ? Client can connect to API
- ? Intune deployment works
scripts/Install-Client-Intune.ps1- ? Fixed installation scriptscripts/Test-AppsettingsJsonPath.ps1- ? Test script (new)
SecureBootWatcher.Client/appsettings.json- Reference configuration file
docs/INTUNE_WIN32_DEPLOYMENT.md- Intune deployment guidedocs/INSTALL_CLIENT_INTUNE_JSON_PATH_FIX.md- This document
If you have deployed the client via Intune with the broken script:
-
Re-create Intune package with fixed script:
.\scripts\Prepare-IntunePackage.ps1 -
Update Win32 app in Intune with new
.intunewinfile -
Re-deploy to affected devices
-
Manual fix (if needed on already-installed devices):
# On affected devices $appsettingsPath = "C:\Program Files\SecureBootWatcher\appsettings.json" $config = Get-Content $appsettingsPath -Raw | ConvertFrom-Json # Set correct values $config.SecureBootWatcher.Sinks.WebApi.BaseAddress = "https://your-api.contoso.com:5001" $config.SecureBootWatcher.Sinks.EnableWebApi = $true $config.SecureBootWatcher.FleetId = "your-fleet-id" # Save $config | ConvertTo-Json -Depth 10 | Set-Content $appsettingsPath -Encoding UTF8
The fix is included automatically when creating new packages:
# Create new package with fix included
.\scripts\Prepare-IntunePackage.ps1
# Deploy to Intune as normalStatus: ? Fixed and Tested
Last Updated: 2025-01-24
Version: v1.11.3
Made with ?? for IT Operations Teams