Skip to content

Commit fe1be54

Browse files
committed
fix(auth): skip SSO nag before setup is complete
Suppress the SSO migration prompt until the SAM app is configured, matching the same setup-completion check used by GetCippAlerts.
1 parent 98d8244 commit fe1be54

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Modules/CIPPCore/Public/Authentication/Test-CIPPAccess.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,11 @@ function Test-CIPPAccess {
244244
}
245245
}
246246

247-
if ($env:CIPPNG -ne 'true' -and $HasAnyPermission) {
247+
# SSO migration requires a working SAM app — suppress the nag until initial
248+
# setup is complete (same check GetCippAlerts uses for its setup alert)
249+
$SetupCompleted = $env:ApplicationID -and $env:ApplicationID -ne 'LongApplicationID'
250+
251+
if ($env:CIPPNG -ne 'true' -and $HasAnyPermission -and $SetupCompleted) {
248252
try {
249253
$SSOTable = Get-CIPPTable -tablename 'SSOMigration'
250254
$SSOMigration = Get-CIPPAzDataTableEntity @SSOTable -Filter "PartitionKey eq 'SSO' and RowKey eq 'MigrationConfig'" -ErrorAction SilentlyContinue

0 commit comments

Comments
 (0)