I just put a small sample here. Tested for LiveID and ActiveDirectory.
IServiceManagement<IOrganizationService> organizationServiceManagement
= ServiceConfigurationFactory.CreateManagement<IOrganizationService>(
new Uri("http ... Organization.svc"));
AuthenticationProviderType authenticationProvierType
= organizationServiceManagement.AuthenticationType;
Console.WriteLine(authenticationProvierType);
Console.ReadKey();