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

# atoti.security.Security.individual_roles

#### *property* Security.individual\_roles *: [MutableMapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableMapping)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [Set](https://docs.python.org/3/library/collections.abc.html#collections.abc.Set)\[[str](https://docs.python.org/3/library/stdtypes.html#str)]]*

Mapping from username to roles granted on top of the ones that can be added by authentication providers.

### Example

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> session_config = tt.SessionConfig(security=tt.SecurityConfig())
>>> session = tt.Session.start(session_config)
>>> username = "John"
>>> username in session.security.individual_roles
False
>>> session.security.individual_roles[username] = {
...     "ROLE_USA",
...     "ROLE_USER",
... }
>>> sorted(session.security.individual_roles[username])
['ROLE_USA', 'ROLE_USER']
>>> session.security.individual_roles[username] -= {"ROLE_USA"}
>>> session.security.individual_roles[username]
frozenset({'ROLE_USER'})
>>> # Removing all the roles will prevent the user from accessing the application:
>>> del session.security.individual_roles[username]
>>> username in session.security.individual_roles
False
```
