> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/agents/mapping-identities-and-credentials-to-agents.md).

# Mapping Identities and Credentials to Agents

### Overview

Mapping identities and credentials to an agent records which identities and credentials the agent **has access to**.

This is an **access association**, not an ownership mapping.

| Mapping in BalkanID                                        | What it means                                                                                    |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **Identity → Employee** (Identities page, Map to employee) | Ownership / accountability — which person the identity belongs to or is owned by                 |
| **Identity or Credential → Agent** (this page)             | Access — which identities and credentials the agent can use or is associated with for governance |

Use agent mapping when you need to answer: *Which identities and credentials does this agent have access to?*

{% hint style="info" %}
Mapping identities to agents is available when Agents (Early Access) is enabled for your tenant. The Identity Mapping drawer then includes **Map to employee** and **Map to agent**.
{% endhint %}

### Map identities to an agent

1. Login to the BalkanID application and switch to the tenant you want to update.
2. Head to **Identities**.
3. Select one or more identities the agent has access to.
4. Click **Map identities**.<br>

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FqXaRubaipZBILisAO9Bq%2FMap%20identities.png?alt=media&amp;token=42904470-fdbb-4b2c-a3a3-8858908b1829" alt=""><figcaption></figcaption></figure>
5. In the **Identity Mapping** drawer, select **Map to agent** (not **Map to employee**).
6. Choose the target **Agent**.
7. Confirm the mapping.<br>

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FgIsYNG79x1JIUlS3Gae7%2Fimage.png?alt=media&amp;token=c6575615-bf96-455a-8c75-7fb22e1fca1e" alt=""><figcaption></figcaption></figure>

#### Result

BalkanID processes the mapping asynchronously. When complete:

* The identities appear on the agent’s **Identities** tab
* The agent appears under **Accessible by agents** on those identity detail pages
* Identity counts on the Agents page update accordingly

<figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FUjjeKSCw5Bi5gkYCCyHT%2Fimage.png?alt=media&amp;token=eaf45272-9e32-4f92-9c46-1aa76f27e92d" alt=""><figcaption></figcaption></figure>

### Map credentials to an agent

1. Login to the BalkanID application and switch to the tenant you want to update.
2. Head to **Credentials**.
3. Select one or more credentials the agent has access to.
4. Click **Map credentials**.\ <br>

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FL3Buu8rYfQsfpHpugf2w%2FMap%20credentials.png?alt=media&amp;token=445d7119-a24c-491d-9c55-6cabd58b3644" alt=""><figcaption></figcaption></figure>
5. Choose the target **Agent**.
6. Confirm the mapping.<br>

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2F0QOLuEvpXbgRQ3FsXgzh%2Fimage.png?alt=media&amp;token=ecf912e9-fd4d-4031-8f06-769c650a7756" alt=""><figcaption></figcaption></figure>

#### Result

BalkanID processes the mapping asynchronously. When complete:

* The credentials appear on the agent’s **Credentials** tab
* The agent appears under **Accessible by agents** on those credential detail pages

<figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fm03dgVf8czwBxq9BGMIE%2Fimage.png?alt=media&amp;token=64b44897-9de8-4e7c-862f-0dd8f720a61f" alt=""><figcaption></figcaption></figure>

### When to map

Use mapping when:

* An agent uses a human or non-human identity to act in an application
* An agent uses or is bound to a credential (for example, an API key or vault secret)
* You need a clear access inventory for blast-radius analysis

For extracted agents, some access associations may already be discovered from the source integration. Manual mapping fills gaps and covers agents that were registered or uploaded in BalkanID.

To remove an access association, see [Unmapping Identities and Credentials from Agents](/agents/unmapping-identities-and-credentials-from-agents.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.balkan.id/agents/mapping-identities-and-credentials-to-agents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
