# \[Authorize\]

*noun*

say it: **“AW-ther-yze”** **/ˈɔːθəraɪz/**

An ASP.NET Core attribute that only lets signed-in users, or users in a role, reach an action or controller.

## What is **[Authorize]**?

`[Authorize]` (or `.RequireAuthorization()`) means an endpoint needs a signed-in user, optionally with a role or policy. `[AllowAnonymous]` opens it again.

```csharp
[Authorize(Roles = "Admin")]
[HttpDelete("{id:int}")]
public IActionResult Delete(int id) => NoContent();
```

## In a sentence

- “**Authorize**(Roles = "Admin") keeps the Delete action for admins only.”

Level: Journeyman · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/authorize
