Interface IUserAndGroupDAL
Functionality for working with AAD users and groups.
Namespace: Microsoft.GNS.Roster.DataAccess
Assembly: Microsoft.GNS.Roster.DataAccess.dll
Syntax
public interface IUserAndGroupDAL
Methods
View SourceFindGroupsAsync(String, Int32)
Searches the group graph on displayName and mail.
Declaration
IAsyncEnumerable<IRosterSecurityGroup> FindGroupsAsync(string principalName, int maxSearchResults)
Parameters
Type | Name | Description |
---|---|---|
System.String | principalName | Term to do a startsWith search against Email or Display Name. |
System.Int32 | maxSearchResults | Maximum number of results to return. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IRosterSecurityGroup> | Returns a filtered list of RosterSecurityGroup types generated from the graph. |
FindUsersAsync(String, Int32)
Searches the user graph on displayName and mail.
Declaration
IAsyncEnumerable<IRosterUser> FindUsersAsync(string principalName, int maxSearchResults)
Parameters
Type | Name | Description |
---|---|---|
System.String | principalName | Term to do a startsWith search against Email or Display Name. |
System.Int32 | maxSearchResults | Maximum number of results to return. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IRosterUser> | Returns a filtered list of RosterUser types generated from the graph. |
GetCurrentUserAsync()
Gets the currently logged in user.
Declaration
Task<IRosterUser> GetCurrentUserAsync()
Returns
Type | Description |
---|---|
Task<IRosterUser> | A IRosterUser object. |
GetSecurityGroupAsync(String)
Gets a security group.
Declaration
Task<IRosterSecurityGroup> GetSecurityGroupAsync(string groupIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupIdentifier | The AAD group Id or group name or group email. |
Returns
Type | Description |
---|---|
Task<IRosterSecurityGroup> | A IRosterSecurityGroup object. |
GetUserAsync(String)
Gets a user profile.
Declaration
Task<IRosterUser> GetUserAsync(string principalName)
Parameters
Type | Name | Description |
---|---|---|
System.String | principalName | The email formatted principal name. i.e. alias@microsoft.com. |
Returns
Type | Description |
---|---|
Task<IRosterUser> | A IRosterUser object. |
IsCurrentUserMemberOfSecurityGroupAsync(Guid)
Determines if the current user is a member of a security group.
Declaration
Task<bool> IsCurrentUserMemberOfSecurityGroupAsync(Guid groupId)
Parameters
Type | Name | Description |
---|---|---|
Guid | groupId | The security group Id in which to check membership. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if the current user is a member. Otherwise, false. |