Forum Discussion
Power BI embedded: load report into web control in winforms application
powerbi-oe wrote:
Yes it's to embed in a winforms based application.
I believe the token expires after an hour ? How does charging/licensing work with a token that never expires, as i thought each new token generated is the used for charging purposes?
Thanks
How do you get your token at this moment?
Regarding a token never expires, check the sample in github.
var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id,Convert.ToDateTime("2099-12-31"));I'm using the power bi CLI tool (https://github.com/Microsoft/PowerBI-Cli) to upload my pbix into a Azure workspace and then generate the required tokens.
Hope that makes sense? And thanks for your help!
- Eric_Zhang9 years agoMicrosoft Employee
If the "create-embed-token" doesn't accept an expire date parameter in your link, I'm afraid you'll have to download the git sample in my previous reply and following this tutorial. Then change the code by adding an extra parameter in the sample to get a token never expires.
- powerbi-oe9 years agoFrequent Visitor
Eric_Zhang Thanks will take a look. Re my question on charging. Looking at charging again, this in done each time a session is generated or after an hour.
"A session is a set of interactions between an end user and a Power BI Embedded report. Each time a Power BI Embedded report is displayed to a user, a session is initiated and the subscription holder will be charged for a session. Sessions are billed at a flat rate, independent of the number of visual elements in a report or how frequently the report content is refreshed. A session ends either when the user closes the report, or one hour after the session was initiated, whichever comes first."
Is this hour tied to the report token which also lives for an hour ?
- Eric_Zhang9 years agoMicrosoft Employee
powerbi-oe wrote:
Eric_Zhang Thanks will take a look. Re my question on charging. Looking at charging again, this in done each time a session is generated or after an hour.
"A session is a set of interactions between an end user and a Power BI Embedded report. Each time a Power BI Embedded report is displayed to a user, a session is initiated and the subscription holder will be charged for a session. Sessions are billed at a flat rate, independent of the number of visual elements in a report or how frequently the report content is refreshed. A session ends either when the user closes the report, or one hour after the session was initiated, whichever comes first."
Is this hour tied to the report token which also lives for an hour ?
AFAIK, the token is independent of the session. The token is used to access the reports, it can be expired in one or more hours.