# Set up Service Account for PowerBI

Setting up a **Service Account** for Power BI in Azure Entra requires multiple steps, including creating an app, assigning permissions, and configuring access. Follow this guide to complete the setup.

***

### Step 1: Register an App in Azure Entra

1. Go to the Azure Portal.  Navigate to Azure Entra ID <br>
2. Click "+ Add"  >  "App registration"\ <img src="/files/jmfupd4V0aqcREWaItrs" alt="" data-size="original">
3. Enter app registration details.\
   \
   **name:** Smaply Power Bi. connector\
   **Supported account type:** Accounts in this organizational directory only (Single tenant\
   \
   no need to set a redirect URI\
   \
   And click "Register"\
   \
   ![](/files/9laUh0mI9Aw2gVjbsKFZ)

### Step 2: Assign API Permissions

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeJL_tltOBQWbHJAIPANSO6dUULP63pSFHAxizGGa4RdfPxcn-WrTcznJYj7L477H0GnIGDfBHDGJ6Yks1xI3GUwYDDljuFHqHUtHVCf_Ca_aScPkvw4nNDy3qMSO61FxLbjZLh3g?key=QblDC7Y9WvcIuF07GXei4lyL" alt=""><figcaption></figcaption></figure>

1. Within your app, navigate to **Manage** > **API Permissions** > **Add a permission**.
2. Choose **Power BI Service**.
3. Under **Application permissions**, add:
   * `Tenant.Read.All`
4. Click **Grant admin consent for {Your Tenant Name}**.<br>

### Step 3: Create a Client Secret

1. Within your app, navigate to **Certificates & Secrets**.
2. Under **Client Secrets**, click **+ New client secret**.\
   \
   **description:**  Power Bi Smaply connector client secret\
   **expiry:** \[e.g. 12 months]<br>
3. Copy the generated **Client Secret** value, you will need it later.

### Step 4: Create a Security Group & Assign the Service Principal

1. Navigate to [Azure Groups Management](https://portal.azure.com/#view/Microsoft_AAD_IAM/GroupsManagementMenuBlade/~/Overview).
2. Create a new security group ("New Group").\
   **type**: Security\
   **name**: smaply-powerbi\
   **description**: Smaply PowerBI Connector security group\
   **members:**  assign the **Service Principal (Application).**  E.g. "Smaply Power BI Connector" from step 1

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc27fuwzslhqKp8aV7S0zjdJqdL8irtPh-QRUS1Ehc5qu41PFx7ETUKe7vxpEFHeHs3bA3JoZq5t0L7o28ZGONX3Wz2gNsD35qNUTzmTVt_d3VcfCXcwnwJyCtKnLjxCCrnZH-07g?key=QblDC7Y9WvcIuF07GXei4lyL" alt=""><figcaption></figcaption></figure>

### Step 5: Configure Power BI Admin Settings

1. Go to the [Power BI Admin Portal](https://app.powerbi.com/admin-portal/tenantSettings?experience=power-bi).
2. Open **Service Principal can use Fabric APIs** (under tenant settings)&#x20;
3. Enable **Service Principal** access.\
   \
   Apply to:\
   **Specific security groups:** type in the security group name from step4; e.g. smaply-powerbi\
   \
   Apply<br>

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

### Step 6: Assign Access to PowerBI workspace

In **Power BI**, do the following for all of the Workspace that Smaply should have access to:<br>

1. Assign the **Security Group** (created in Step 4) to a workspace.\
   **Note:** your personal workspaces won't support this.\
   \
   ![](/files/fxQBV8jobpyZ5zUnqc2r)<br>

   <figure><img src="/files/Xh1uo0OIoF5zCcv1Ohjl" alt=""><figcaption></figcaption></figure>
2. Make sure you have given the service account member access to the workspace.<br>

   <figure><img src="/files/bvyMQ8YJQkcLdbudLvz2" alt=""><figcaption></figcaption></figure>
3. <mark style="color:red;">Wait</mark> <mark style="color:red;"></mark><mark style="color:red;">**30 to 60 minutes**</mark> <mark style="color:red;"></mark><mark style="color:red;">for the changes to propagate.</mark>

### Step 7: Configure Power BI in Smaply

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfwoof1mrcrqRvBWiosX3XDlcD_bPoWpH3fICZF1JOhIq1dWbAhePTR4R2Ooq5p6a8w02ZeMkAGQUu-piahcTBC5asRNMaUTS94j9s5bXFVYH9cl8pcIW4X-PubT6uw0naQ_Tx6XA?key=QblDC7Y9WvcIuF07GXei4lyL" alt=""><figcaption></figcaption></figure>

Once all configurations are in place, set up the integration in **Smaply** using from the service principal (Entra app).  You'll need:

* Tenant ID
* Client ID
* Client Secret (from step3)\
  \
  ![](/files/bmVZ5H0Y3yoULWhhxo3I)
* In Smaply **Account settings** >  **Integrations** > **Power BI**, add the details&#x20;
* Once validated, you will be able to select any workspace that you set up in step6

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

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

Now you're ready to create your first metric with Power BI 🚀. [ Learn how.](/integrations/metrics-tools/powerbi/using-the-power-bi-integration-in-a-metric.md)


---

# 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://helpdesk.smaply.app/integrations/metrics-tools/powerbi/configuring-the-powerbi-integration/set-up-service-account-for-powerbi.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.
