Skip to content

Commit

Permalink
Fixed incorrect log message
Browse files Browse the repository at this point in the history
Fixed incorrect log message
  • Loading branch information
BNWEIN committed Jul 21, 2023
1 parent 46614e1 commit 9b54ca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Standards_DisableM365GroupUsers/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ try {
($CurrentState.values | Where-Object { $_.name -eq 'EnableGroupCreation' }).value = "false"
$body = "{values : $($CurrentState.values | ConvertTo-Json -Compress)}"
(New-GraphPostRequest -tenantid $tenant -Uri "https://graph.microsoft.com/beta/settings/$($CurrentState.id)" -Type patch -Body $body -ContentType "application/json")
Write-LogMessage -API "Standards" -tenant $tenant -message "Standards API: Disabled users from creating Security Groups." -sev Info
Write-LogMessage -API "Standards" -tenant $tenant -message "Standards API: Disabled users from creating M365 Groups." -sev Info
}
catch {
Write-LogMessage -API "Standards" -tenant $tenant -message "Failed to disable users from creating Security Groups: $($_.exception.message)" -sev "Error"
Write-LogMessage -API "Standards" -tenant $tenant -message "Failed to disable users from creating M365 Groups: $($_.exception.message)" -sev "Error"
}

0 comments on commit 9b54ca1

Please sign in to comment.