private static IFabricGroup CreateFabricGroup(FabricGraphApiGroup groupEntry) { return(new FabricGroup { ExternalIdentifier = groupEntry.Group.Id, TenantId = groupEntry.TenantId, GroupName = groupEntry.Group.DisplayName, IdentityProvider = IdentityProviders.AzureActiveDirectory, PrincipalType = PrincipalType.Group }); }
public AzureDirectoryProviderServiceGroupTests() { _mockGraphClient = new Mock <IMicrosoftGraphApi>(); _allGroups = new ActiveDirectoryDataHelper().GetMicrosoftGraphGroups(); _firstGroup = _allGroups.First(); _listGroups = _allGroups.ToList(); _emptyGroups = new List <FabricGraphApiGroup>(); _mockGraphClient.Setup(p => p.GetGroupCollectionsAsync(It.IsAny <string>(), null)) .Returns(Task.FromResult(_emptyGroups)); }
private static FabricGroup CreateFabricGroup(FabricGraphApiGroup groupEntry) { return(new FabricGroup { ExternalIdentifier = groupEntry.Group.Id, TenantId = groupEntry.TenantId, TenantAlias = groupEntry.TenantAlias ?? groupEntry.TenantId, GroupName = groupEntry.Group.DisplayName, IdentityProvider = FabricIdentityConstants.SearchIdentityProviders.AzureActiveDirectory, PrincipalType = FabricIdentityEnums.PrincipalType.Group }); }
private static IFabricPrincipal CreateGroupPrincipal(FabricGraphApiGroup groupEntry) { var result = new FabricPrincipal { SubjectId = groupEntry.Group.DisplayName, ExternalIdentifier = groupEntry.Group.Id, TenantId = groupEntry.TenantId, DisplayName = groupEntry.Group.DisplayName, IdentityProvider = IdentityProviders.AzureActiveDirectory, PrincipalType = PrincipalType.Group }; return(result); }