Azure Active Directory: Days Since Last AADC Sync
submitted
J
Jordan Docter
Missing the
marks
around true. Should be this.SystemInfo.DirectorySync[?DirectorySyncEnabled == true
&& DaysSinceLastSync_r > 0
].DaysSinceLastSync_rG
Greg Wenner
I believe this has been superceded by the built in Metric:Azure Active Directory: Organizations With Directory Sync Enabled And >= 1 Day Since Last Sync ListSystemInfo.DirectorySync[?DaysSinceLastSync_r >
0
&& DirectorySyncEnabled].OrganizationNameE
Eric Vollbrecht
Is this the same data as Organization.onPremisesSyncEnabled and onPremisesLastSyncDateTime ?
B
Bill Krauss
Figured it out. SystemInfo.DirectorySync[?DaysSinceLastSync_r > '-1'].DaysSinceLastSync_r returns the correct information.
B
Bill Krauss
When I use SystemInfo.DirectorySync[?DaysSinceLastSync_r >
0
] | length(@) or SystemInfo.DirectorySync[?DirectorySyncEnabled == true && DaysSinceLastSync_r > 0
] | length(@) on a client with raw data ofDirectorySync: Array(1)▶0: ObjectOrganizationName: "Contoso"DaysSinceLastSync_r: 82DirectorySyncEnabled: trueDirectoryLastSyncDate: "2021-11-19T01:56:07Z"I get QUERY RESULTS 0. When I change it to a client that has synced less than an hour ago. I get QUERY RESULTS 0. I'm thinking I'm missing something with this one.C
Chris Holliman
An extension to this is to check if AD Sync is enabled in order to eliminate alerts for no sync on "not enabled" clients: SystemInfo.DirectorySync[?DirectorySyncEnabled == true && DaysSinceLastSync_r >
0
] | length(@)