Forum Discussion
PowerBI-JavaScript SDK problem with Azure PowerBi embedded
Thank you for your reply.
I also guess something is wrong with my token.
I generate the token right now with the cli tool. which is more or less the same as the node sdk.
create-token
Creates a Power BI app token
powerbi create-token -t <tokenType> -c <collection> -k <accessKey> -w [workspaceId] -r [reportId]
i used type=embed
Why do i need to generate JSON Web Token (JWT). And where to embed ?
What version of the sdk do you use ?
Thank you for an reply
michael
JWT is just the standard that PowerBI uses to generate a token that can be sent (you can paste your token on that site and see what is inside).
You could manually generate the JWT, but in your case the CLI tool already takes care of all that stuff and it should give you a valid token.
Double check all the parameters?
- tokenType should be 'embed' I think (hard to find any documentation on this...).
- collection is the workspace collection name found in Azure portal.
- accessKey is the secret key of your workspace collection also found in Azure portal.
- workspaceId is the ID of the workspace that you created using the 'create-workspaces' command.
- reportId is the ID of the report you uploaded.
Tokens do have an expiration date, maybe try generating a new one?
That's all I can think of...
- kobaldm10 years agoHelper I
i double checked everything. Still no luck.
What Version of the sdk do you use ?
michael
- ekeijl10 years agoHelper I
I use version 0.1.3 of the Node SDK server side to communicate with the Power BI Embedded APIs.
So I am not using the CLI tool.
I use a specific version of the JS client because of this issue with minification.
- kobaldm10 years agoHelper I
Found the error. Was a typo while creating the token.
Thank you again for helping !!!
michael