---
title: "How does an authorized attribute work in Web API?"  
description: "How does an authorized attribute work in Web API?"  
author: "Revati S Misra"  
published: 2023-12-31  
updated: 2025-01-23  
canonical: https://www.mindstick.com/forum/160552/how-does-an-authorized-attribute-work-in-web-api  
category: ".net core"  
tags: ["asp.net", ".net core", ".net core api"]  
reading_time: 1 minute  

---

# How does an authorized attribute work in Web API?

How does an [authorized](https://answers.mindstick.com/qa/51614/where-is-the-iphone-available-for-purchase-can-it-be-purchased-from-apple-authorized-resellers) [attribute](https://www.mindstick.com/blog/221/attributes-reflection) work in [Web API](https://www.mindstick.com/articles/324352/how-to-create-web-api-in-dot-net-core-3-1-mvc)?

## Replies

### Reply by Khushi Singh

In **[Web](https://www.mindstick.com/articles/12783/the-ultimate-bunch-of-free-web-design-resources) [API](https://www.mindstick.com/articles/12641/instagram-api-upgraded-to-facebook-graph)** the **[Authorize]** attribute is used to limit access to controllers or certain actions depending on the user’s authentication levels. It makes sure that initiated and/or approved clients are only drawn to specific interfaces or terminus of the API.

## How It Works

**Authentication:** [Authorize] attribute is responsible for examining if the request has been made by an authenticated user. Authentications guarantees that the user is indeed whom they claim to be (for instance by tokens, cookies or credentials).

**Authorization**: After confirming the identity the attribute checks whether the user has the appropriate privileges or roles to use the resource. For example, it can limit users with certain roles like “Admin,” or “Manager.”


---

Original Source: https://www.mindstick.com/forum/160552/how-does-an-authorized-attribute-work-in-web-api

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
