Created
January 23, 2018 15:34
-
-
Save ahelland/620d4577a18562029797d9c7293c6de9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tokenCredentials = new TokenCredentials(token.access_token, "Bearer"); | |
// Create a Power BI Client object. It will be used to call Power BI APIs. | |
using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials)) | |
{ | |
// Generate Embed Token. | |
var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view"); | |
var tokenResponse = await client.Dashboards.GenerateTokenInGroupAsync(GroupId, dashboardId, | |
generateTokenRequestParameters); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment