Skip to content

Commit 52ce175

Browse files
committed
fix: exclude imAddresses from user backup/restore
1 parent d17b33f commit 52ce175

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/CIPPCore/Public/New-CIPPBackupTask.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function New-CIPPBackupTask {
2727
}
2828
'users' {
2929
Measure-CippTask -TaskName 'Users' -EventName 'CIPP.BackupCompleted' -Script {
30-
New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/users?$top=999' -tenantid $TenantFilter | Select-Object * -ExcludeProperty mail, provisionedPlans, onPrem*, *passwordProfile*, *serviceProvisioningErrors*, isLicenseReconciliationNeeded, isManagementRestricted, isResourceAccount, *date*, *external*, identities, deletedDateTime, isSipEnabled, assignedPlans, cloudRealtimeCommunicationInfo, deviceKeys, provisionedPlan, securityIdentifier | ForEach-Object {
30+
New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/users?$top=999' -tenantid $TenantFilter | Select-Object * -ExcludeProperty mail, provisionedPlans, onPrem*, *passwordProfile*, *serviceProvisioningErrors*, isLicenseReconciliationNeeded, isManagementRestricted, isResourceAccount, *date*, *external*, identities, deletedDateTime, imAddresses, isSipEnabled, assignedPlans, cloudRealtimeCommunicationInfo, deviceKeys, provisionedPlan, securityIdentifier | ForEach-Object {
3131
#remove the property if the value is $null
3232
$_.psobject.properties | Where-Object { $null -eq $_.Value } | ForEach-Object {
3333
$_.psobject.properties.Remove($_.Name)

Modules/CIPPCore/Public/New-CIPPRestoreTask.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function New-CIPPRestoreTask {
3939
# Helper function to clean user object for Graph API - removes reference properties, nulls, and empty strings
4040
function Clean-GraphObject {
4141
param($Object, [switch]$ExcludeId)
42-
$excludeProps = @('password', 'passwordProfile', '@odata.type', 'manager', 'memberOf', 'createdOnBehalfOf', 'createdByAppId', 'deletedDateTime', 'authorizationInfo')
42+
$excludeProps = @('password', 'passwordProfile', '@odata.type', 'manager', 'memberOf', 'createdOnBehalfOf', 'createdByAppId', 'deletedDateTime', 'authorizationInfo', 'imAddresses')
4343
if ($ExcludeId) {
4444
$excludeProps += @('id')
4545
}

0 commit comments

Comments
 (0)