Class MicrosoftGraphIdentityManagementService
- Namespace
 - FoundationaLLM.Common.Services.Security
 
- Assembly
 - FoundationaLLM.Common.dll
 
Implements group membership services using the Microsoft Graph API.
public class MicrosoftGraphIdentityManagementService : IIdentityManagementService
  - Inheritance
 - 
      
      MicrosoftGraphIdentityManagementService
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Remarks
Initializes a new instance of the MicrosoftGraphIdentityManagementService class.
Constructors
MicrosoftGraphIdentityManagementService(MicrosoftGraphIdentityManagementServiceSettings, GraphServiceClient, ILogger<MicrosoftGraphIdentityManagementService>)
Implements group membership services using the Microsoft Graph API.
public MicrosoftGraphIdentityManagementService(MicrosoftGraphIdentityManagementServiceSettings settings, GraphServiceClient graphServiceClient, ILogger<MicrosoftGraphIdentityManagementService> logger)
  Parameters
settingsMicrosoftGraphIdentityManagementServiceSettingsThe settings for the Microsoft Graph Identity Management Service.
graphServiceClientGraphServiceClientThe GraphServiceClient to be used for API interactions.
loggerILogger<MicrosoftGraphIdentityManagementService>The logger used for logging.
Remarks
Initializes a new instance of the MicrosoftGraphIdentityManagementService class.
Methods
GetGroupsForPrincipal(string)
Retrieves the group identifiers list of the groups where the specified user principal is a member.
public Task<List<string>> GetGroupsForPrincipal(string userIdentifier)
  Parameters
userIdentifierstringThe user identifier for which group membership is retrieved. Can be either an object id or a user principal name (UPN).
Returns
GetObjectsByIds(ObjectQueryParameters)
Retrieves user and group objects by the passed in list of IDs.
public Task<List<ObjectQueryResult>> GetObjectsByIds(ObjectQueryParameters parameters)
  Parameters
parametersObjectQueryParameters
Returns
GetServicePrincipalById(string)
Retrieves a security principal by its identifier.
public Task<ObjectQueryResult> GetServicePrincipalById(string servicePrincipalId)
  Parameters
servicePrincipalIdstringThe service principal identifier used to retrieve a single service principal.
Returns
GetServicePrincipals(ObjectQueryParameters)
Retrieves a list of service principals with filtering and paging options.
public Task<PagedResponse<ObjectQueryResult>> GetServicePrincipals(ObjectQueryParameters queryParams)
  Parameters
queryParamsObjectQueryParametersThe filtering and paging options used when retrieving service principals.
Returns
GetUserById(string)
Retrieves a user account by its identifier.
public Task<ObjectQueryResult> GetUserById(string userId)
  Parameters
userIdstringThe user identifier used to retrieve a single user account.
Returns
GetUserGroupById(string)
Retrieves a group account by its identifier.
public Task<ObjectQueryResult> GetUserGroupById(string groupId)
  Parameters
groupIdstringThe group account identifier used to retrieve a single group account.
Returns
GetUserGroups(ObjectQueryParameters)
Retrieves a list of group accounts with filtering and paging options.
public Task<PagedResponse<ObjectQueryResult>> GetUserGroups(ObjectQueryParameters queryParams)
  Parameters
queryParamsObjectQueryParametersThe filtering and paging options used when retrieving group accounts.
Returns
GetUsers(ObjectQueryParameters)
Retrieves a list of user accounts with filtering and paging options.
public Task<PagedResponse<ObjectQueryResult>> GetUsers(ObjectQueryParameters queryParams)
  Parameters
queryParamsObjectQueryParametersThe filtering and paging options used when retrieving users.