Problem/Motivation

Currently, the module uses the https://api.powerbi.com/v1.0/myorg/GenerateToken endpoint and a related payload (embed token body) to generate the embed token. However, users should also be able to use the https://api.powerbi.com/v1.0/myorg/groups/{GROUP_ID}/reports/{REPORT_ID}/GenerateToken to generate
a token in group (see Embed Token - Reports GenerateTokenInGroup)

Proposed resolution

  • Add a new element on field that allows user to choose the Generate Token on Groups option
  • Create an update function for already existing installations to create data for said element
  • Add a hook to allow users to modify the payload that will be sent to the endpoint
  • Add new function on client to retrieve the token on groups
  • Create tests for functionalities

User interface changes

The users will be able to choose between the current token generation and generating a token in groups when created a PWBI embed field on an entity.

API changes

A hook will be available for users to modify the payload to send when generating a token in groups.

Data model changes

A new column will be added on the PowerBi Embedd Field to store which endpoint to use.

Issue fork pwbi-3572101

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 2.x Comparechanges, plain diff MR !16

Comments

javilagos created an issue. See original summary.

javilagos’s picture

Added a first iteration on the process - but missing tests :)

Let's review and fix any issues!

enriquelacoma made their first commit to this issue’s fork.

enriquelacoma’s picture

Assigned: Unassigned » enriquelacoma
Status: Active » Needs review

enriquelacoma’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

enriquelacoma’s picture

Status: Fixed » Closed (fixed)