> 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 %}
