Skip to content

Commit

Permalink
Merge pull request #1261 from kris6673/kris6673-patch-1
Browse files Browse the repository at this point in the history
FIX: App approval alert only triggering if there is 2 pending and othermails null'ing
  • Loading branch information
KelvinTegelaar authored Jan 25, 2025
2 parents cedb963 + d63346c commit 06c92f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Get-CIPPAlertNewAppApproval {
)
try {
$Approvals = New-GraphGetRequest -Uri "https://graph.microsoft.com/v1.0/identityGovernance/appConsent/appConsentRequests?`$filter=userConsentRequests/any (u:u/status eq 'InProgress')" -tenantid $TenantFilter
if ($Approvals.count -gt 1) {
if ($Approvals.count -gt 0) {
$AlertData = "There are $($Approvals.count) App Approval(s) pending."
Write-AlertTrace -cmdletName $MyInvocation.MyCommand -tenantFilter $TenantFilter -data $AlertData
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Function Invoke-EditUser {
'streetAddress' = $UserObj.streetAddress
'postalCode' = $UserObj.PostalCode
'companyName' = $UserObj.CompanyName
'otherMails' = @($UserObj.otherMails)
'otherMails' = $UserObj.otherMails ? @($UserObj.otherMails) : @()
'passwordProfile' = @{
'forceChangePasswordNextSignIn' = [bool]$UserObj.MustChangePass
}
Expand Down

0 comments on commit 06c92f1

Please sign in to comment.