Power Embedded Docs
English
English
  • Home
    • What is Power Embedded
    • How much does Power Embedded cost?
    • How to start the 30-day free trial
    • Dedicated capacities
    • System Architecture Document
    • System architecture document
  • Schedule a meeting
    • Presentation
    • Installation
    • Technical support
  • Frequently asked questions
    • General Questions
      • How do the Power Embedded savings work?
      • How many users does Power Embedded benefit my company from?
      • Does Microsoft allow the use of Power Embedded? Is it really allowed?
      • What do I need to use Power Embedded?
      • Is it possible to test or PoC the Power Embedded?
      • Do I need to hire the Power Tuning portal? Can't I use Microsoft's?
      • How long does it take to get Power Embedded in my company?
      • Will my users be able to access the reports using mobile devices?
      • Can I cancel Power Embedded? Is there a fine?
    • Licensing
      • Can I use Power BI Pro or Premium per User to Embed?
      • Do I still need a Power BI Pro license, even with Embedded?
      • Can't I share the reports without paying for a license?
      • Isn't accessing reports without a PRO license only possible from the F64?
    • Dedicated capacities
      • Fabric? Power BI Embedded? What are these capabilities?
      • While capacity is paused, no one can access the reports?
      • What are 24x7, 14x6 and 12x5?
      • My company already has Power BI Premium. Do I need to purchase Embedded?
      • A competitor was able to get a much lower Embedded price
      • I don't have an Azure account to contract the capacity
    • Technical questions
      • How does Power Embedded work internally?
      • Power Embedded's internal security
      • Privacy controls and LGPD
      • Differences between Embedded, “Publish to Web” and “Insert Report”
      • Report publishing process
      • System updates
      • System customizations
  • Power Embedded vs Power BI
  • Main features
    • Generative AI - Power Pilot
    • AI on WhatsApp
    • Synchronize with Entra ID
    • Application
    • Dark Mode
    • Scheduling data updates
    • Updating Data
    • Audits
    • Firewall
    • Report catalog
    • Customization of the portal and login screen
    • Sharing with external users
    • Dynamic Models
    • Capacity control
    • Report subscription
    • Integration with Google Analytics
    • Integrated Microsoft, Google and user/password authentication
    • Show report on your system
  • Calculator
  • Azure Partnership
  • News and updates
  • Privacy Policy
  • Portal de Relatórios
    • Visualization portal
      • Filtering reports using query parameters in the URL
    • Report Catalog
    • Navigating Reports
    • Mobile Application (PWA)
    • Report signature
    • Most common problems
      • This report has Row-Level Security (RLS) enabled, and the user is not associated.
      • Power BI service user password has expired
      • You have reached the usage limit of a shared capacity (Pro or PPU) for embedding reports
      • A capacidade não está ligando quando um usuário acessa um relatório
      • Capacity operation failed with error code CapacityNotActive
      • Embedding a DirectLake report is not supported
      • Não foi possível abrir o relatório pois o Power Embedded não enviou as informações do modelo
      • Relatórios utilizando Live Connection com Analysis Services não carregam
      • Sua capacidade de avaliação gratuita do Fabric expirará em X dias
      • Não é possível carregar o modelo devido ao alcance dos limites de capacidade
        • Como reiniciar e alterar a capacidade pelo Power Embedded
        • Como reiniciar e alterar a capacidade pelo Azure
      • Não foi possível carregar os dados para este visual: ClientError_TokenExpired
      • Erro ao exportar relatório - Error Code 400
      • Os visuais não certificados do AppSource ou aqueles adicionados a partir de um arquivo não estão dis
  • Portal de Administração
    • Overview
    • Portal navigation
    • First Access
    • DNS configuration
      • Cloudflare
    • Artefatos
      • Data set
        • Filtragem dinâmica
      • Capacidades
        • Permissões no Azure
        • Configurar a capacidade no Power Embedded
        • Atribuir um workspace à uma capacidade
        • Otimização de custos
        • Redimensionamento automático
        • Auditoria de capacidade
      • Workspaces
      • Gateways
      • Fontes de dados
    • Application
    • Reports
      • Como configurar o workspace
      • Importar relatório
        • Com importar relatório externo
      • Editar relatório
      • Como excluir um relatório
      • Segurança (RLS)
      • Publicar relatório no Power BI
      • Dynamic models
      • Assinatura de relatórios
      • Importação automática de relatórios criados pelo portal de visualização
    • Users
      • Create/edit user
      • Tipos de funções de usuário
      • Métodos de autenticação
      • Autenticação de 2 fatores
      • Importar arquivo CSV
      • Importar do Entra ID
      • Importar com API
      • Bloqueios e senhas
      • Convidar usuário externo para acessar o portal de administração
      • Usuário do Windows AD (Analysis Services)
      • Personalização do método de autenticação por usuário ou grupo
    • Grupos
      • Criar/editar grupo
      • Métodos de autenticação
      • Importar arquivo CSV
      • Importar do Entra ID
      • Synchronize with Entra ID
      • Importar com API
    • Folders
    • Audits
      • Reports
      • Usage Metrics
      • Report Catalog
      • Sent Emails
      • Entities (Changes)
      • Access Logs
      • Capacity
      • Permissions
      • Firewall
      • Audit Tab in Power Pilot
    • Billing
      • Configuring Invoicing
      • Payment Link and Invoice
    • Power Pilot (IA)
      • Prerequisites
      • Hiring an AI
        • Azure OpenAI
        • OpenAI
      • AI Models
      • AI Assistants
      • RLS on PowerPilot
      • Audits
      • AI on WhatsApp
      • Power Pilot Questions
    • Firewall
      • Blocked Login Attempts
      • Ignoring Firewall Rules
      • Firewall Audit page
    • Companies
      • Multiple companies or organizations
    • Warnings
    • Settings
      • Organization
        • Changing the Application Password
        • Atualização de token
        • Google Analytics
        • Configuração do sub-domínio
      • Visualization portal
        • Customizing Colors
        • Personalizar imagens
      • Login screen
        • Customize colors
        • Customize images
        • Authentication methods
      • Parameters
        • General customizations
        • Edit and Creation Mode
      • Emails
    • Migration
    • Systems of support
  • Links úteis
    • Power Embedded sites
    • Price Calculator
    • News
    • Meeting Support
    • Meet Power Tuning
    • Azure Partnership
    • Videos and tutorials
  • Documentação Técnica
    • Installation
      • Fabric Trial
      • Power BI Embedded
    • Commercial Presentation Document
    • Documento de arquitetura do sistema
    • API
      • Automações com APIs
      • Show report on your system
      • Filtragem dinâmica
      • Documentação técnica
Powered by GitBook
On this page
  • How to obtain the API Key to authenticate requests
  • Method 1: Using the Identity/URL endpoint
  • General parameters
  • API return
  • Method 2: Using the Identity/Token endpoint
  • Documentation
  1. Documentação Técnica
  2. API

Show report on your system

PreviousAutomações com APIsNextFiltragem dinâmica

Last updated 3 months ago

How to obtain the API Key to authenticate requests

The first step is to get the API key from the settings screen to authenticate:

With this key, you can now authenticate requests using the API.

Method 1: Using the Identity/URL endpoint

To return the URL that you will use to access the reporting portal transparently, without going through the login screen, use the POST call below:

The X-API-Key header must be entered, passing as its value the API token generated above by the settings screen.

The body of the request has the following possible values:

{
    "userEmail": "[email protected]",
    "baseUrl": "https://bi.minhaempresa.com.br",
    "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "reportId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "hideMenu": true,
    "hideNavbar": true,
    "hideSidebar": true,
    "embed": true
}

General parameters

  • userEmail: The only mandatory field in the request. The email address of the person who is logged into your system must be entered. This user will be recorded in the audits and the reports that this user has access to will be shown on the screen. If the report has an RLS, it will be applied automatically, using the filtering rules for the user provided.

  • baseUrl: In this field, you must fill in the information about the configured subdomain. It is mandatory to enter this data so that the entire experience is personalized, including in the event of token expiry.

When the organizationId and reportId parameters are NOT entered, the complete viewing portal will be rendered in your system, just as when you access it in traditional mode (without API), showing only the reports that the user entered has access to. The user will be free to browse the reports they have access to.

Display control parameters

hideMenu: Hides the menu bar when the report is opened.

hideNavbar: Hide the navigation bar when the report is opened

hideSidebar: Hide the sidebar on the navigation screen.

embed: This is a shortcut parameter that can be used to set all the above display properties at once.

Parameters for displaying just one report

If you want to display a specific report, you must enter the following 2 parameters:

organizationId: This is the unique ID of your organization in the system. This ID is fixed and is never changed. You can obtain this ID from the URL on the “Settings” screen

reportId: This is the report ID, where each report has its own unique ID (it is the same as the reportId of the report in the Power BI service). To get the report ID, capture the ID from the URL on the report editing screen:

API return

The API callback is a URL that can only be accessed once and if you don't access it, it will expire in 5 minutes:

If you have entered the other parameters, such as organizationId and reportId (to show only 1 report) and the display parameters, the request will have this format:

And the URL returned will be something like this:

With this URL generated, you just need to create an iframe using it like the example below:

And with that, you can now show Power BI reports in your application, through Power Embedded, transparently and securely.

As the URL token is for SINGLE use, this URL can only be accessed once. If you want to show the report again, you'll have to execute this request again.

As the token is for the specific user, when accessing a report, Power Embedded knows who the user is accessing and validates whether that user has access to the report being shown and applies the RLS rules if the report does.

Method 2: Using the Identity/Token endpoint

To be able to generate the access token and render the reports in your application, you must first obtain the token using the call below:

And the server will return the SINGLE-USE token to call the API's (each request must ask for a new token):

Now we can call the API that renders the report, giving it parameters:

  • The base URL of the viewing portal (Ex: https://relatorios.powerembedded.com.br - Here you use your custom domain, such as https://bi.suaempresa.com.br/, for example)

  • The token generated in the previous step (Ex: 2506b719-5a7e-789b-812f-c64013cc617f)

  • The organization ID (fixed ID for Power Embedded customers - it's in the URL of the settings screen - Ex: 12201800-1a46-491a-bfe3-6ee5590e372e)

  • The ID of the report to be embedded (Ex: a4ee7a1e-6c65-44e7-9a38-06dd8514483c)

As the token is for SINGLE use, this URL can only be accessed once.

If you want to embed the report again, you will have to generate a new access token for the e-mail address provided.

As the token is for the specific user, when accessing a report, Power Embedded knows who the user is accessing and validates whether that user has access to the report being embedded and applies the RLS rules, if the report does.

Documentation

This will open an iframe with the following URL:

Example with the variables filled in:

Complete API documentation:

API demo page for Embedding reports:

https://bi.suaempresa.com.br/integration/tokenauth?token={token_gerado}&embed=true&returnUrl=/Organization/{Id_da_Organizacao}/Report/{Id_Relatorio}
https://bi.suaempresa.com.br/integration/tokenauth?token=98b6e796-3b1f-4f2f-abfe-aa2a8a1eadb8&embed=true&returnUrl=/Organization/12201800-1a46-491a-bfe3-6ee5590e372e/Report/a4ee7a1e-6c65-44e7-9a38-06dd8514483c
Swagger UI (powerembedded.com.br)
Demo – PowerPortal.IntegrationDemo (powerembedded.com.br)