private static PolicyData GetPolicySetting(IAirSyncUser user) { ADObjectId policyId = user.ADUser.ActiveSyncMailboxPolicy; AirSyncDiagnostics.TraceDebug <string>(ExTraceGlobals.RequestsTracer, null, "Loading user PolicySettings data.Policy DN {0}", policyId.DistinguishedName); Func <PolicyData> loadDataAction = () => ADNotificationManager.LoadPolicySetting(ADNotificationManager.CreateScopedADSession(user), user, policyId, true); ADNotificationManager.ADSettingsInfo <PolicyData> adsettingsInfo; ADNotificationManager.LoadADSettingsData <PolicyData>(ADNotificationManager.policies, policyId.DistinguishedName, loadDataAction, user.OrganizationId.PartitionId, out adsettingsInfo); return(adsettingsInfo.ADSettingsData); }