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

# Masking Exemption

<Info>
  Masking precedence: [Masking Exemption](/security/data-masking/access-unmasked-data) > [Global Masking Rule](/security/data-masking/global-masking-rule) > [Column Masking](/security/data-masking/column-masking).
</Info>

Certain roles can grant masking exemption to the users to access the unmasked data:

* Built-in roles: `Workspace Admin`, `DBA`, `Project Owner`.
* [Custom roles](/administration/roles): `bb.policies.createMaskingExemptionPolicy`, `bb.policies.updateMaskingExemptionPolicy`, `bb.policies.deleteMaskingExemptionPolicy`.

To grant masking exemption:

1. Go to the project, click **Manage** > **Masking Exemptions**.
2. Click **Grant Exemption**. You can grant either `Export` or `Query` exemption.
3. Select the user/groups and the database/table, and click **Confirm**.

   <img src="https://mintcdn.com/dbx/hVml3kA8vNK6vcVL/content/docs/security/data-masking/bb-grant-exemption.webp?fit=max&auto=format&n=hVml3kA8vNK6vcVL&q=85&s=ad3ca08241c21f28bbf2d766b57ab18e" alt="bb-grant-exemption" width="2202" height="1344" data-path="content/docs/security/data-masking/bb-grant-exemption.webp" />

You can't grant masking exemption to the service account. Because the intended use is to exempt human users from the masking policy when they query from SQL Editor.

<Note>
  Masking exemption is not supported for document databases (**MongoDB** and **Elasticsearch**). See [Document Database Masking](/security/data-masking/document-database-masking).
</Note>
