public async Task <IActionResult> RemoveUser([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "access/removeUser")] AuthJanitorAuthorizedUser userToBeRemoved)
        {
            if (!_identityService.CurrentUserHasRole(AuthJanitorRoles.GlobalAdmin))
            {
                return(new UnauthorizedResult());
            }

            return(await _managementService.RemoveAuthorizedUser(userToBeRemoved.UPN));
        }
 private static AuthJanitorAuthorizedUserViewModel GetViewModel(IServiceProvider serviceProvider, AuthJanitorAuthorizedUser authorizedUser) =>
 new AuthJanitorAuthorizedUserViewModel()
 {
     UPN         = authorizedUser.UPN,
     DisplayName = authorizedUser.DisplayName,
     RoleValue   = authorizedUser.RoleValue
 };