You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: SAM certificate provisioning in authentication load
Set SetFromProfile earlier to prevent re-entrancy when Update-CIPPSAMCertificate calls Get-GraphToken. Add logic to provision a missing SAM certificate during authentication initialization, with improved error handling and logging. The weekly token update will retry if provisioning fails.
Write-LogMessage-message "Provisioned SAM certificate during authentication load. Thumbprint: $($CertResult.Thumbprint), storage mode: $($CertResult.StorageMode)"-Sev 'Info'-API 'CIPP Authentication'
58
+
}
42
59
} catch {
43
-
Write-Information"SAM certificate not preloaded (not created yet?): $($_.Exception.Message)"
60
+
Write-LogMessage-message 'Could not preload or provision the SAM certificate. It will be retried by the weekly token update.'-Sev 'Warning'-API 'CIPP Authentication'-LogData (Get-CippException-Exception $_)
44
61
}
45
62
46
-
$env:SetFromProfile=$true
47
63
Write-LogMessage-message 'Reloaded authentication data from KeyVault'-Sev 'debug'-API 'CIPP Authentication'
0 commit comments