Skip to content

Commit fa1620f

Browse files
committed
"syncInfoNote": "Outlook for iOS and Android uses modern authentication and does not report ActiveSync sync times."
UI now has a clear explanation available for empty sync fields API responses are easier to reason about (null vs empty string) Reduces confusion around Outlook mobile ActiveSync reporting No functional changes to device allow/block/delete operations Signed-off-by: fit-jv <Jaco.Venter@FocusedIT.co.uk>
1 parent 2b369db commit fa1620f

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Email-Exchange/Reports/Invoke-ListActiveSyncDevices.ps1

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ function Invoke-ListActiveSyncDevices {
1212

1313
try {
1414
$GraphRequest = New-ExoRequest -tenantid $TenantFilter -cmdlet 'Get-MobileDevice' -cmdParams @{ ResultSize = 'Unlimited' } |
15-
Select-Object @{ Name = 'userDisplayName'; Expression = { $_.UserDisplayName } },
16-
@{ Name = 'userPrincipalName'; Expression = { ($_.Identity -split '\\')[0] } },
17-
@{ Name = 'deviceFriendlyName'; Expression = { if ([string]::IsNullOrEmpty($_.FriendlyName)) { 'Unknown' } else { $_.FriendlyName } } },
18-
@{ Name = 'deviceModel'; Expression = { $_.DeviceModel } },
19-
@{ Name = 'deviceOS'; Expression = { $_.DeviceOS } },
20-
@{ Name = 'deviceType'; Expression = { $_.DeviceType } },
21-
@{ Name = 'clientType'; Expression = { $_.ClientType } },
22-
@{ Name = 'clientVersion'; Expression = { $_.ClientVersion } },
23-
@{ Name = 'deviceAccessState'; Expression = { $_.DeviceAccessState } },
24-
@{ Name = 'firstSyncTime'; Expression = { if ($_.FirstSyncTime) { $_.FirstSyncTime.ToString('yyyy-MM-ddTHH:mm:ssZ') } else { '' } } },
25-
@{ Name = 'lastSyncAttemptTime'; Expression = { if ($_.LastSyncAttemptTime) { $_.LastSyncAttemptTime.ToString('yyyy-MM-ddTHH:mm:ssZ') } else { '' } } },
26-
@{ Name = 'lastSuccessSync'; Expression = { if ($_.LastSuccessSync) { $_.LastSuccessSync.ToString('yyyy-MM-ddTHH:mm:ssZ') } else { '' } } },
27-
@{ Name = 'deviceID'; Expression = { $_.DeviceId } },
28-
@{ Name = 'identity'; Expression = { $_.Identity } },
29-
@{ Name = 'Guid'; Expression = { $_.Guid } }
15+
Select-Object @{ Name = 'userDisplayName'; Expression = { $_.UserDisplayName } },
16+
@{ Name = 'userPrincipalName'; Expression = { ($_.Identity -split '\\')[0] } },
17+
@{ Name = 'deviceFriendlyName'; Expression = { if ([string]::IsNullOrEmpty($_.FriendlyName)) { 'Unknown' } else { $_.FriendlyName } } },
18+
@{ Name = 'deviceModel'; Expression = { $_.DeviceModel } },
19+
@{ Name = 'deviceOS'; Expression = { $_.DeviceOS } },
20+
@{ Name = 'deviceType'; Expression = { $_.DeviceType } },
21+
@{ Name = 'clientType'; Expression = { $_.ClientType } },
22+
@{ Name = 'clientVersion'; Expression = { $_.ClientVersion } },
23+
@{ Name = 'deviceAccessState'; Expression = { $_.DeviceAccessState } },
24+
@{ Name = 'firstSyncTime'; Expression = {if ($_.FirstSyncTime) {$_.FirstSyncTime.ToString('yyyy-MM-ddTHH:mm:ssZ')} else {$null}}},
25+
@{ Name = 'lastSyncAttemptTime'; Expression = {if ($_.LastSyncAttemptTime) {$_.LastSyncAttemptTime.ToString('yyyy-MM-ddTHH:mm:ssZ')} else {$null}}},
26+
@{ Name = 'lastSuccessSync'; Expression = {if ($_.LastSuccessSync) {$_.LastSuccessSync.ToString('yyyy-MM-ddTHH:mm:ssZ')} else {$null}}},
27+
@{ Name = 'syncInfoNote'; Expression = {if ($_.DeviceModel -match 'Outlook' -or $_.DeviceType -eq 'Outlook' -or $_.ClientType -eq 'Outlook') {'Outlook for iOS and Android uses modern authentication and does not report ActiveSync sync times.'} else {$null}}},
28+
@{ Name = 'deviceID'; Expression = { $_.DeviceId } },
29+
@{ Name = 'identity'; Expression = { $_.Identity } },
30+
@{ Name = 'Guid'; Expression = { $_.Guid } }
31+
)
3032
$StatusCode = [HttpStatusCode]::OK
3133
} catch {
3234
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message

0 commit comments

Comments
 (0)