[GH-ISSUE #5058] [Bug]: Hudu Extension Sync reports 0 Users and 0 Devices despite populated Extension Cache #2407

Closed
opened 2026-03-02 13:52:04 +03:00 by kerem · 3 comments
Owner

Originally created by @lacymooretx on GitHub (Dec 5, 2025).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/5058

Description

The Hudu Extension Sync completes successfully but reports "Users: 0" and "Devices: 0" for all tenants, even though:

  1. The Extension Cache sync jobs (Users, Devices, Groups, etc.) complete successfully
  2. The CIPP API returns users when queried directly (e.g., 200+ users for one tenant)
  3. The Magic Dash updates correctly in Hudu (but shows "0 Licensed Users")

The sync logs show "Starting Device Processing" immediately after "Starting Hudu Extension Sync", skipping "Starting User Processing" entirely - indicating $licensedUsers is empty/null.

Steps to Reproduce

  1. Configure Hudu integration with valid API key and URL
  2. Map tenants to Hudu companies (Tenant Mapping tab)
  3. Map asset layouts: Users → People, Devices → Computer Assets (Field Mapping tab)
  4. Wait for Extension Sync jobs to run (Users, Devices, Groups, Mailboxes, Overview)
  5. Wait for Hudu Extension Sync to run (or trigger Force Sync)
  6. Check Integration Sync results - all tenants show "Users: 0, Devices: 0"

Expected Behavior

Hudu sync should read from the Extension Cache and sync users/devices to Hudu asset layouts.

Actual Behavior

Hudu sync reports 0 users and 0 devices. The sync log is missing "Starting User Processing" which only appears when $licensedUsers has data (line 421 in Invoke-HuduExtensionSync.ps1).

Sync Results (All Tenants Show Same Pattern)

{
  "Tenant": "example.com",
  "Name": "Hudu Extension Sync",
  "Results": {
    "Name": "Example Company",
    "Users": 0,
    "Devices": 0,
    "Errors": [
      "Company: Unable to fetch One Drive Details Hudu",
      "Company: Unable to fetch CAS Mailbox Details",
      "Company: Unable to fetch Mailbox Details",
      "Company: Unable to fetch Mailbox Statistic Details"
    ],
    "Logs": [
      "Starting Hudu Extension Sync",
      "Starting Device Processing",
      "Updated Magic Dash for Example Company",
      "Starting Domain Processing",
      "Hudu Sync Completed"
    ]
  }
}

Note: "Starting User Processing" is missing from logs - this only appears if $licensedUsers is not empty.

Verification

Extension Cache sync jobs completed successfully before Hudu sync ran:

Tenant Sync Type Last Sync Status
example.com Users 2025-12-05T20:00:59Z Completed
example.com Devices 2025-12-05T20:00:37Z Completed
example.com Groups 2025-12-05T20:00:49Z Completed
example.com Hudu 2025-12-05T21:45:25Z Completed (0 users)

Direct API query confirms users exist:

curl "${CIPP_API_URL}/api/listUsers?tenantFilter=example.com" | jq 'length'
# Returns: 200+

Hudu Configuration

  • Integration: Enabled
  • Create missing users: Enabled
  • Create missing devices: Enabled
  • Field Mapping:
    • Users → People
    • Devices → Computer Assets
  • Tenant Mapping: All tenants mapped to correct Hudu companies

Suspected Root Cause

The Hudu sync reads from Extension Cache via Get-ExtensionCacheData:

# Invoke-HuduExtensionSync.ps1, line 48
$ExtensionCache = Get-ExtensionCacheData -TenantFilter $Tenant.defaultDomainName

# Line 162-163
$Users = $ExtensionCache.Users
$licensedUsers = $Users | Where-Object { $null -ne $_.assignedLicenses.skuId }

Either:

  1. Get-ExtensionCacheData returns empty/null for Users
  2. The cache table key doesn't match the tenant filter being used
  3. The Users data in cache doesn't have assignedLicenses.skuId populated

Environment

  • CIPP Hosted (not self-hosted)
  • Hudu Cloud
  • All tenants affected (8 tenants tested, all show 0 users/devices)
  • Modules/CippExtensions/Public/Hudu/Invoke-HuduExtensionSync.ps1
  • Modules/CippExtensions/Public/Extension Functions/Get-ExtensionCacheData.ps1

Workaround

None found yet.

Originally created by @lacymooretx on GitHub (Dec 5, 2025). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/5058 ## Description The Hudu Extension Sync completes successfully but reports "Users: 0" and "Devices: 0" for **all tenants**, even though: 1. The Extension Cache sync jobs (Users, Devices, Groups, etc.) complete successfully 2. The CIPP API returns users when queried directly (e.g., 200+ users for one tenant) 3. The Magic Dash updates correctly in Hudu (but shows "0 Licensed Users") The sync logs show "Starting Device Processing" immediately after "Starting Hudu Extension Sync", skipping "Starting User Processing" entirely - indicating `$licensedUsers` is empty/null. ## Steps to Reproduce 1. Configure Hudu integration with valid API key and URL 2. Map tenants to Hudu companies (Tenant Mapping tab) 3. Map asset layouts: Users → People, Devices → Computer Assets (Field Mapping tab) 4. Wait for Extension Sync jobs to run (Users, Devices, Groups, Mailboxes, Overview) 5. Wait for Hudu Extension Sync to run (or trigger Force Sync) 6. Check Integration Sync results - all tenants show "Users: 0, Devices: 0" ## Expected Behavior Hudu sync should read from the Extension Cache and sync users/devices to Hudu asset layouts. ## Actual Behavior Hudu sync reports 0 users and 0 devices. The sync log is missing "Starting User Processing" which only appears when `$licensedUsers` has data (line 421 in `Invoke-HuduExtensionSync.ps1`). ## Sync Results (All Tenants Show Same Pattern) ```json { "Tenant": "example.com", "Name": "Hudu Extension Sync", "Results": { "Name": "Example Company", "Users": 0, "Devices": 0, "Errors": [ "Company: Unable to fetch One Drive Details Hudu", "Company: Unable to fetch CAS Mailbox Details", "Company: Unable to fetch Mailbox Details", "Company: Unable to fetch Mailbox Statistic Details" ], "Logs": [ "Starting Hudu Extension Sync", "Starting Device Processing", "Updated Magic Dash for Example Company", "Starting Domain Processing", "Hudu Sync Completed" ] } } ``` Note: "Starting User Processing" is missing from logs - this only appears if `$licensedUsers` is not empty. ## Verification Extension Cache sync jobs completed successfully before Hudu sync ran: | Tenant | Sync Type | Last Sync | Status | |--------|-----------|-----------|--------| | example.com | Users | 2025-12-05T20:00:59Z | Completed | | example.com | Devices | 2025-12-05T20:00:37Z | Completed | | example.com | Groups | 2025-12-05T20:00:49Z | Completed | | example.com | Hudu | 2025-12-05T21:45:25Z | Completed (0 users) | Direct API query confirms users exist: ```bash curl "${CIPP_API_URL}/api/listUsers?tenantFilter=example.com" | jq 'length' # Returns: 200+ ``` ## Hudu Configuration - Integration: Enabled - Create missing users: Enabled - Create missing devices: Enabled - Field Mapping: - Users → People - Devices → Computer Assets - Tenant Mapping: All tenants mapped to correct Hudu companies ## Suspected Root Cause The Hudu sync reads from Extension Cache via `Get-ExtensionCacheData`: ```powershell # Invoke-HuduExtensionSync.ps1, line 48 $ExtensionCache = Get-ExtensionCacheData -TenantFilter $Tenant.defaultDomainName # Line 162-163 $Users = $ExtensionCache.Users $licensedUsers = $Users | Where-Object { $null -ne $_.assignedLicenses.skuId } ``` Either: 1. `Get-ExtensionCacheData` returns empty/null for Users 2. The cache table key doesn't match the tenant filter being used 3. The Users data in cache doesn't have `assignedLicenses.skuId` populated ## Environment - CIPP Hosted (not self-hosted) - Hudu Cloud - All tenants affected (8 tenants tested, all show 0 users/devices) ## Related Files - `Modules/CippExtensions/Public/Hudu/Invoke-HuduExtensionSync.ps1` - `Modules/CippExtensions/Public/Extension Functions/Get-ExtensionCacheData.ps1` ## Workaround None found yet.
kerem 2026-03-02 13:52:04 +03:00
Author
Owner

@KelvinTegelaar commented on GitHub (Dec 14, 2025):

I wish everyone made these complete reports, thank you!

<!-- gh-comment-id:3649947771 --> @KelvinTegelaar commented on GitHub (Dec 14, 2025): I wish everyone made these complete reports, thank you!
Author
Owner

@github-actions[bot] commented on GitHub (Dec 23, 2025):

This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://docs.cipp.app/dev-documentation/contributing-to-the-code . Please notify the team if you are working on this yourself.

<!-- gh-comment-id:3684801275 --> @github-actions[bot] commented on GitHub (Dec 23, 2025): This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://docs.cipp.app/dev-documentation/contributing-to-the-code . Please notify the team if you are working on this yourself.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 28, 2025):

This issue was closed because it has been stalled for 14 days with no activity.

<!-- gh-comment-id:3694382255 --> @github-actions[bot] commented on GitHub (Dec 28, 2025): This issue was closed because it has been stalled for 14 days with no activity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#2407
No description provided.