private static bool IsAuthenticationTypeParameterValid(ADClientAccessRule rule) { if (rule.HasAnyOfSpecificProtocolsPredicate(new List <ClientAccessProtocol> { ClientAccessProtocol.RemotePowerShell })) { return(!rule.HasAuthenticationMethodPredicate(ClientAccessAuthenticationMethod.AdfsAuthentication)); } if (rule.HasAnyOfSpecificProtocolsPredicate(new List <ClientAccessProtocol> { ClientAccessProtocol.OutlookWebApp, ClientAccessProtocol.ExchangeAdminCenter })) { return(!rule.HasAuthenticationMethodPredicate(ClientAccessAuthenticationMethod.NonBasicAuthentication)); } return(!rule.HasAnyAuthenticationMethodPredicate()); }
public static bool IsADRuleValid(ADClientAccessRule rule) { return(ClientAccessRulesStorageManager.IsAuthenticationTypeParameterValid(rule) && rule.ValidateUserRecipientFilterParsesWithSchema()); }