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
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:
Comments
Comment #3
javilagos commentedAdded a first iteration on the process - but missing tests :)
Let's review and fix any issues!
Comment #5
enriquelacoma commentedComment #7
enriquelacoma commentedComment #9
enriquelacoma commented