# Data sources

In this menu, you can view, export, and filter the data sources connected to the datasets.

<figure><img src="/files/03e8ytlmrkXmPPvenND0" alt=""><figcaption></figcaption></figure>

### Permissions to List Gateways and Data Sources

To list the existing gateways in the Power BI environment, it is necessary to grant a permission to the application user (PowerEmbedded-App) in Power BI Service.

Access the [Manage connections and gateways](https://app.powerbi.com/groups/me/gateways) screen and click on the option ***Manage on-premises data gateways.***

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

Now click on the 3 ellipses (...) next to the gateway you want to grant permission for and select the Manage Users option.

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

In the user management screen, search for the name of the application you are using in Power Embedded (the default name is *PowerEmbedded-App*), mark the Administrator permission, and click the Share button.

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

Now repeat this process for all gateways you need to manage and access data through Power Embedded, **especially if you are using a connection with Analysis Services (SSAS).**

{% hint style="danger" %}
If you are using a DirectQuery or Live Connection with an **Analysis Services (SSAS),** this gateway configuration may be required to open reports if they present connection errors.
{% endhint %}

{% hint style="warning" %}
**IMPORTANT:** It is not necessary to change permissions on the data sources, since the Power Embedded user already has administrator permission on the Gateway.

This significantly reduces the effort of configuring these permissions for each data source, since the number of data sources is much greater than the number of gateways.
{% endhint %}

### Pinning Users in Analysis Services

A feature was developed in Power Embedded to address a specific scenario, in case you have an Analysis Services service and want to configure RLS (Row-Level Security) at the company level rather than at the user level.

If you want to work with RLS in Analysis Services at the user level rather than the company level, learn more by accessing the article [Facilitating user and RLS mapping when using Analysis Services](https://powerembedded.com.br/facilitando-o-mapeamento-de-usuarios-e-rls-ao-utilizar-o-analysis-services/).

To configure RLS in Analysis Services, whether accessed through Power Embedded or Power BI, it is necessary to perform user-by-user mapping in Power BI gateway settings.

<div align="left"><figure><img src="/files/kcqsb6ITi65D22NpSTi2" alt=""><figcaption></figcaption></figure></div>

If you have 100 users, this will require considerable time to configure manually and apply RLS, since there is no API available to automate this in Power BI.

If you want to use a fixed user, regardless of who is accessing the report, simply use an asterisk (\*) in the original name and the name of the user that will be used to make the connection.

However, for a scenario where it is not necessary to individually identify each user, but rather to filter data using a fixed user per company, there is a feature in data sources, when the data type is Analysis Services, called "Pin User" that solves this problem.

<figure><img src="/files/0Gm3PyAPOYCfAg1GcxFq" alt=""><figcaption></figcaption></figure>

By pinning the user for each company in this connection, I define which user will be sent to Analysis Services, regardless of which user is viewing the report.

For example, if all users associated with the Microsoft company are using this Analysis Services, all requests sent by Power Embedded to Power BI will be attributed to the user "douglas.rosseto@<powertuning@.com.br>" in the example below.

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

When configuring the user mapping in the Power BI gateways screen, I only need to do it for the user Douglas Rosseto, instead of performing the process for all 100 users individually, which would be time-consuming and complicated in terms of maintenance.

This is a way to simplify this specific scenario, where it is not necessary to apply an individual RLS filter for each user, but rather per company, which would meet the needs with the registration of a single user.


---

# Agent Instructions: 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:

```
GET https://docs.powerembedded.com/administration-portal/artifacts/data-sources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
