Resource tokens are tokens associated with permission resources and establish connections between a user and the permissions of that user for resources stored in DocumentDB (collections, documents, and stored procedures).
Imagine a scenario where a multi-tenant web application needs access to your database. For each tenant, a separate collection inside the database is created. The web application only needs access to the specific collection for the tenant. We can solve this by creating a resource token only for the new collection.
The following steps are performed to achieve this goal: