> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fga.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing User Access

> Granting a user access to a particular object

In this guide you will learn how to grant a [user](https://docs.fga.dev/fga-concepts.md#what-is-a-user) access to a particular [object](https://docs.fga.dev/fga-concepts.md#what-is-an-object).

**When to use**

Granting access with a *[relationship tuple](https://docs.fga.dev/fga-concepts.md#what-is-a-relationship-tuple)* is a core part of Auth0 FGA. Without any relationship tuples, any *[check](https://docs.fga.dev/fga-concepts.md#what-is-a-check-request)* will fail. You should use:

* *authorization model* to represent what **relation**s are possible between the users and objects in your system
* *relationship tuples* to represent the facts about the relationships between users and objects in your system.

## Before you start

In order to understand this guide correctly you must be familiar with some [Auth0 FGA Concepts](https://docs.fga.dev/fga-concepts.md) and know how to develop the things that we will list below.

<details>
  <summary>
    Assume that you have the following [authorization model](https://docs.fga.dev/fga-concepts.md#what-is-an-authorization-model).\\

    You have a [type](https://docs.fga.dev/fga-concepts.md#what-is-a-type) called `tweet` that can have a `reader`.
  </summary>

  ***

  In addition, you will need to know the following:

  ### Direct access

  You need to know how to create an authorization model and create a relationship tuple to grant a user access to an object. [Learn more →](https://docs.fga.dev/modeling/basics/modeling-basics.md)

  ### Auth0 FGA concepts

  * A [Type](https://docs.fga.dev/fga-concepts.md#what-is-a-type): a class of objects that have similar characteristics
  * A [User](https://docs.fga.dev/fga-concepts.md#what-is-a-user): an entity in the system that can be related to an object
  * A [Relation](https://docs.fga.dev/fga-concepts.md#what-is-a-relation): is a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system
  * An [Object](https://docs.fga.dev/fga-concepts.md#what-is-an-object): represents an entity in the system. Users' relationships to it can be define through relationship tuples and the authorization model
  * A [Relationship Tuple](https://docs.fga.dev/fga-concepts.md#what-is-a-relationship-tuple): a grouping consisting of a user, a relation and an object stored in Auth0 FGA
</details>

## Step by step

### 01. Adding direct relationship

For our application, we will give user Anne the `reader` relationship to a particular `tweet`. To do so we add a tuple as follows:

```json theme={null}
[
  // Anne can read tweet:1
  {
    "user": "user:anne",
    "relation": "reader",
    "object": "tweet:1"
  }
]
```

With the above, we have added a [**direct** relationship](https://docs.fga.dev/modeling/concepts/direct-relationships.md) between Anne and `tweet:1`. When we call the Check API to see if Anne has a `reader` relationship, Auth0 FGA will say yes.

### 02. Removing direct relationship

Now let's change this so that Anne no longer has a `reader` relationship to `tweet:1` by deleting the tuple:

With this, we have removed the [direct relationship](https://docs.fga.dev/modeling/concepts/direct-relationships.md) between Anne and `tweet:1`. And because our type definition for `reader` does not include any other relations, a call to the Check API will now return a negative response.

## Related Sections

Check the following sections for more on how to manage user access.

[Direct Access
Learn about how to model granting user access to an object.](https://docs.fga.dev/modeling/basics/modeling-basics.md)

[Modeling Public Access
Learn about how to model granting public access.](https://docs.fga.dev/modeling/basics/public-access.md)

[How to update relationship tuples
Learn about how to update relationship tuples in SDK.](https://docs.fga.dev/integration/update-tuples.md)
