Skip to content

Commit 95d2571

Browse files
Merge pull request #1237 from rvdwegen/patch-14
Add Apple Business Manager terms alert
2 parents cecd2d5 + 44d0ffe commit 95d2571

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
function Get-CIPPAlertAppleTerms {
2+
<#
3+
.FUNCTIONALITY
4+
Entrypoint
5+
#>
6+
[CmdletBinding()]
7+
Param (
8+
[Parameter(Mandatory = $false)]
9+
[Alias('input')]
10+
$InputValue,
11+
$TenantFilter
12+
)
13+
14+
# 0 = Expired
15+
# 1 = expired?
16+
# 2 = unknown
17+
# 3 = Terms & Conditions
18+
# 4 = Warning
19+
20+
try {
21+
$appleterms = New-GraphGetRequest -uri "https://graph.microsoft.com/beta/deviceManagement/depOnboardingSettings" -tenantid $TenantFilter
22+
} catch {
23+
return
24+
}
25+
26+
if ($appleterms.lastSyncErrorCode -eq 3) {
27+
$AlertData = "New Apple Business Manager terms are ready to accept."
28+
Write-AlertTrace -cmdletName $MyInvocation.MyCommand -tenantFilter $TenantFilter -data $AlertData
29+
}
30+
}

0 commit comments

Comments
 (0)