> 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="/files/8fZCAZ5vqx4WXb5B6PvI" 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 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.infotopics.com/writebackextreme/features/power-bi-extension/authentication/username-setup.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.
