> For the complete documentation index, see [llms.txt](https://docs.infotopics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infotopics.com/writebackextreme/features/power-bi-extension/authentication/username-setup.md).

# Username setup

Some authentication methods require a **calculated username** to be passed from Power BI to WriteBackExtreme.

This is only required when using one of the following authentication methods:

* Username + Password
* Pincode
* No Authentication

#### Create a username measure

To retrieve the current Power BI user, create a new **measure** in your semantic model using the following DAX formula:

```
Username = USERPRINCIPALNAME()
```

More information about the difference between `USERNAME()` and `USERPRINCIPALNAME()` can be found here:\
<https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/USERNAME-v-s-USERPRINCIPALNAME-in-RLS-for-Power-BI-Embedded/ba-p/1867670>

#### Add the username to the visual

1. Select the **WriteBackExtreme visual**
2. Open the **visual settings sidebar**
3. Add the created measure to the **Username field**

The username will now be passed to WriteBackExtreme during authentication.

<figure><img src="https://3247237607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0gkOLIfzuEyMP2kvoT9o%2Fuploads%2FUInzvb7Se7mCCrJ2mEy5%2FusernameSetUp.gif?alt=media&amp;token=5f5f82bb-63d7-4610-abb4-328eafcefcfb" alt=""><figcaption></figcaption></figure>


---

# 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.infotopics.com/writebackextreme/features/power-bi-extension/authentication/username-setup.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.
