We would like to monitor (check periodically) if Azure Active Directory is in sync with on-prem infrastructure. Azure AD Connect is used to sync the data to Azure.
Based on the documentation: https://docs.microsoft.com/en-us/graph/api/resources/organization?view=graph-rest-1.0 there is value: "onPremisesSyncEnabled" that has value "true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default)."
If I read that correctly that flag might be used for monitoring (false - currently is not sync, true - currently is in sync). However I don't have any environment to test that it is working this way. Anybody has tested if that works this way?