Table of Contents

Class RoleAssignmentsController

Namespace
FoundationaLLM.Authorization.API.Controllers
Assembly
FoundationaLLM.Authorization.API.dll

Provides security endpoints.

[Authorize(Policy = "MicrosoftEntraIDNoScopes")]
[ApiController]
[Consumes("application/json", new string[] { })]
[Produces("application/json", new string[] { })]
[Route("instances/{instanceId}/roleassignments")]
public class RoleAssignmentsController : Controller, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable
Inheritance
RoleAssignmentsController
Implements
Inherited Members
Extension Methods

Constructors

RoleAssignmentsController(IAuthorizationCore)

Provides security endpoints.

public RoleAssignmentsController(IAuthorizationCore authorizationCore)

Parameters

authorizationCore IAuthorizationCore

The IAuthorizationCore service used to process authorization requests.

Methods

AssignRole(string, RoleAssignmentRequest)

Assigns a role to an Entra ID user or group.

[HttpPost]
public Task<IActionResult> AssignRole(string instanceId, RoleAssignmentRequest roleAssignmentRequest)

Parameters

instanceId string

The FoundationaLLM instance identifier.

roleAssignmentRequest RoleAssignmentRequest

The role assignment request.

Returns

Task<IActionResult>

The role assignment result.

GetRoleAssignments(string, RoleAssignmentQueryParameters)

Returns a list of role assignments for the specified instance.

[HttpPost("query")]
public IActionResult GetRoleAssignments(string instanceId, RoleAssignmentQueryParameters queryParameters)

Parameters

instanceId string

The FoundationaLLM instance identifier.

queryParameters RoleAssignmentQueryParameters

Returns

IActionResult

The list of all role assignments for the specified instance.

RevokeRoleAssignment(string, string)

Revokes a role from an Entra ID user or group.

[HttpDelete("{*roleAssignment}")]
public Task<IActionResult> RevokeRoleAssignment(string instanceId, string roleAssignment)

Parameters

instanceId string

The FoundationaLLM instance identifier.

roleAssignment string

The role assignment object identifier.

Returns

Task<IActionResult>

The role assignment result.