-
Notifications
You must be signed in to change notification settings - Fork 477
Get correlation ID
liavZayde edited this page May 20, 2020
·
3 revisions
The getCorrelationId
API lets you get the current Power BI embed correlation ID.
The Power BI embed correlation ID can be used to correlate your application session ID with the Power BI embed session ID. Supplying it to Power BI support will allow us to have additional debugging information.
The getCorrelationId
function can be called from any type of embed artifacts (report, dashboard, dashboard tile, etc.).
/**
* @returns {Promise<string>}
*/
getCorrelationId(): Promise<string>;
The function returns the embed correlation ID.
report.getCorrelationId().then((correlationId) => {
...
});
Example of how to get the correlation ID when an error occurs.
dashboard.on("error", function (error) {
dashboard.getCorrelationId().then((correlationId) => {
console.log("Error occurred in embed session: " + correlationId + " Error: " + error.detail.message);
});
});
The getCorrelationId
will work only after the report is loaded.