Skip to content

Commit d9c6203

Browse files
committed
fix: update expiration days logic for SharePoint and OneDrive file requests
1 parent f105398 commit d9c6203

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/CIPPStandards/Public/Standards/Invoke-CIPPStandardSPFileRequests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ function Invoke-CIPPStandardSPFileRequests {
164164
$ExpectedValue = @{
165165
CoreRequestFilesLinkEnabled = $WantedState
166166
OneDriveRequestFilesLinkEnabled = $WantedState
167-
CoreRequestFilesLinkExpirationInDays = if ($null -ne $ExpirationDays -and $WantedState -eq $true) { $ExpirationDays } else { $null }
168-
OneDriveRequestFilesLinkExpirationInDays = if ($null -ne $ExpirationDays -and $WantedState -eq $true) { $ExpirationDays } else { $null }
167+
CoreRequestFilesLinkExpirationInDays = if ($null -ne $ExpirationDays) { $ExpirationDays } else { $CurrentState.CoreRequestFilesLinkExpirationInDays }
168+
OneDriveRequestFilesLinkExpirationInDays = if ($null -ne $ExpirationDays) { $ExpirationDays } else { $CurrentState.OneDriveRequestFilesLinkExpirationInDays }
169169
SharingCapability = if ($WantedState -eq $true) { 'External Users and Guests (Anyone)' } else { $SharingCapabilityEnum[$CurrentState.SharingCapability] }
170170
}
171171
Set-CIPPStandardsCompareField -FieldName 'standards.SPFileRequests' -CurrentValue $CurrentValue -ExpectedValue $ExpectedValue -Tenant $Tenant

0 commit comments

Comments
 (0)