public async Task <IActionResult> AddUserPermissionsToTenant(string tenantId, string userId, string[] permissions) { try { await _permissionsService.AddUserPermissionsToTenantAsync(tenantId, userId, permissions); return(Ok()); } catch (ItemAlreadyExistsException ex) { _logger.LogError("Permissions were not able to be added to {userId} on {tenantId}", userId, tenantId); return(BadRequest(ex.Message)); } }