> For the complete documentation index, see [llms.txt](https://docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keyfax.biz/product-suite/keynamics/configuration/mappings/mapping-usernames.md).

# Mapping Usernames

When launching Keyfax via KeyNamics, it can be useful to pass the current logged-in Dynamics 365 username through to Keyfax. This allows Keyfax reports to identify which operator or advisor logged a particular repair or enquiry, which is valuable for auditing and operational reporting.

**Default Behaviour**

By default, KeyNamics passes the username operator to Keyfax on launch. This default exists because any username passed to Keyfax must correspond to an existing, enabled user account within Keyfax Administrator Tools. Using a generic default avoids the need for organisations to provision a Keyfax user account for every advisor before they can use KeyNamics.

### Sending the Logged-in Username from a Model-Driven App

To pass the current logged-in Dynamics 365 username to Keyfax on launch, configure a mapping within the KeyNamics model-driven app as shown below:

* **Entity**: Global (or a specific entity)
* **Source Type:** Dynamics – the logged in User name
* **Target:** UserName
* **Default**: operator (optional - this will only be supplied if no username can be obtained)

<figure><img src="/files/ChpqPmzku3LcEJPl9b2z" alt=""><figcaption></figcaption></figure>

Once this mapping is in place, the logged-in user's name will be passed to Keyfax within the `<UserName/>` element of the start-up data on launch. For example, if the user is logged into Dynamics as John Smith, the value John Smith will be sent to Keyfax.

{% hint style="warning" %}
**WARNING** When supplying custom usernames, a matching user account must exist within Keyfax with an identical username. If no matching account exists, Keyfax will return the following error:\
"Keyfax user 'John Smith' is not defined or enabled." Ensure all required user accounts are created and enabled in Keyfax Administrator Tools before enabling this mapping.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.keyfax.biz/product-suite/keynamics/configuration/mappings/mapping-usernames.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
