This is a basic UserOwnsData based sample for embed report api.
You can either register a native app to run the sample or use the default public app already in the solution.
If you decide to use your registered app, use the following parameters:
Redirect URL - http://localhost:21638
Home Page URL - http://localhost:21638
Change the ApplicationId in the appsettings.json file.
Build and Run the sample (if you are using the default app just build and run without changing the ApplicationId).
For using AppOwnsData, you need to obtain an embed token,
you can use the following code (from the AppOwnsData sample):
var tokenCredentials = new TokenCredentials(authenticationResult.AccessToken, "Bearer");
using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials))
{
GenerateTokenRequest generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view");
var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(WorkspaceId, report.Id, generateTokenRequestParameters);
}