Git Product home page Git Product logo

embed-api-sample's Introduction

Embed-API-Sample

A sample application to use the Power BI APIs for embedding. This makes use of the Power BI .NET SDK which in turn calls the Power BI REST API.

Register Azure AD App

You can register your Azure AD app by following the steps in the following document.

Update Password and Client ID

After you create your Azure AD App, you will want to update the Password and Client ID within secrets.cs.

// The Azure AD App - Application ID/Client ID
public static string ClientID = "<ENTER CLIENT/APPLICATION ID>";

// The Azure AD App - Client Secret
public static string ClientSecret = "<ENTER CLIENT SECRET>";

embed-api-sample's People

Contributors

guyinacube avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

embed-api-sample's Issues

Error running sample

I've been having the same issue with all of the examples provided regarding PowerBI embedded. In this example, after providing valid login credentials and Client/AppID in the sample code, I get the following exception:

System.AggregateException: One or more errors occurred. ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'.
Trace ID: 508f60ea-d74b-4656-b8a4-a1ce93711900
Correlation ID: 54cff198-48ae-42c6-aae1-10b028d7d020
Timestamp: 2017-09-05 16:17:51Z ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). ---> System.Exception: {"error":"invalid_client","error_description":"AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'.\r\nTrace ID: 508f60ea-d74b-4656-b8a4-a1ce93711900\r\nCorrelation ID: 54cff198-48ae-42c6-aae1-10b028d7d020\r\nTimestamp: 2017-09-05 16:17:51Z","error_codes":[70002],"timestamp":"2017-09-05 16:17:51Z","trace_id":"508f60ea-d74b-4656-b8a4-a1ce93711900","correlation_id":"54cff198-48ae-42c6-aae1-10b028d7d020"}
--- End of inner exception stack trace ---
at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpClientWrapper.d__30.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.IdentityModel.Clients.ActiveDirectory.AdalHttpClient.d__211.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.IdentityModel.Clients.ActiveDirectory.AdalHttpClient.<GetResponseAsync>d__201.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AcquireTokenHandlerBase.d__67.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AcquireTokenHandlerBase.d__64.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AcquireTokenHandlerBase.d__55.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at EmbedAPISample.Program.<>c.<<Authorize>b__10_0>d.MoveNext() in F:\Downloads\Embed-API-Sample-master\EmbedAPISample\Program.cs:line 145 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at EmbedAPISample.Program.Main(String[] args) in F:\Downloads\Embed-API-Sample-master\EmbedAPISample\Program.cs:line 35 ---> (Inner Exception #0) Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'. Trace ID: 508f60ea-d74b-4656-b8a4-a1ce93711900 Correlation ID: 54cff198-48ae-42c6-aae1-10b028d7d020 Timestamp: 2017-09-05 16:17:51Z ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). ---> System.Exception: {"error":"invalid_client","error_description":"AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'.\r\nTrace ID: 508f60ea-d74b-4656-b8a4-a1ce93711900\r\nCorrelation ID: 54cff198-48ae-42c6-aae1-10b028d7d020\r\nTimestamp: 2017-09-05 16:17:51Z","error_codes":[70002],"timestamp":"2017-09-05 16:17:51Z","trace_id":"508f60ea-d74b-4656-b8a4-a1ce93711900","correlation_id":"54cff198-48ae-42c6-aae1-10b028d7d020"} --- End of inner exception stack trace --- at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpClientWrapper.<GetResponseAsync>d__30.MoveNext() --- End of inner exception stack trace --- at Microsoft.IdentityModel.Clients.ActiveDirectory.AdalHttpClient.<GetResponseAsync>d__211.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AdalHttpClient.d__201.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.IdentityModel.Clients.ActiveDirectory.AcquireTokenHandlerBase.<SendHttpMessageAsync>d__67.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.IdentityModel.Clients.ActiveDirectory.AcquireTokenHandlerBase.<SendTokenRequestAsync>d__64.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.IdentityModel.Clients.ActiveDirectory.AcquireTokenHandlerBase.<RunAsync>d__55.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonAsync>d__52.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.<AcquireTokenAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at EmbedAPISample.Program.<>c.<b__10_0>d.MoveNext() in F:\Downloads\Embed-API-Sample-master\EmbedAPISample\Program.cs:line 145
ErrorCode: invalid_client
StatusCode: 401<---

operation returned an invalid status code forbidden in client.Reports.GenerateTokenInGroupAsync

Hi Team,

I have used one application from Github called (AppsOwnData) In this application i passed the application id created(Which created in Azure AAD) and userid and password of Power bi service where my power bi report is present. So end user can have it without passing any credentials.

I passed the specific report workspace id and report id in application and found like the report is loading in the application.

Now below is my issue scenario:
I needed on private workspace which could be access by only specific user.
To do that i requested my admin to crated Power bi Embedded service in Azure and there i given one specific name to this service.

Once he done he created one new workspace with his credentials in Power bi service and linked Power bi Embedded service to this workspace. He provided permission to me and provided role called contributor.

Also he uploaded one sample .pbix file to this new workspace id and load the report and shared me the report url e.g: https://app.powerbi.com/groups/{someid}/reports/{someid}/ReportSection3?noSignUpCheck=1&refreshAccessToken=true

When i accessed that url with my credentials in power bi service i could see the new workspace created there and reports loading for me.

Now when i tried to load this report through application with passing my user credentials then getting below exception:

operation returned an invalid status code forbidden
in below line of code:
var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(GroupId, report.Id, generateTokenRequestParameters);

Below is the complete stack trace:
at Microsoft.PowerBI.Api.V2.Reports.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Api.V2.ReportsExtensions.d__53.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at DevExpress_3D.PowerBILanding.d__17.MoveNext() in D:\Vikash\IMT-Jan_20032020\Application\DevExpress_3D\PowerBILanding.aspx.cs:line 151

Note: The previous credentials which i used to embed the report in application was having public workspace.

Please help me to fix the above issue.

Invalid status code 'Forbidden'

Hi sir, I have run your sample then i got stucked in 2 case:

  1. I changed clientId, username, password then I got The request body must contain the following parameter: 'client_secret or client_assertion.
  2. After some researched I found that I should use
    var clientCre = new ClientCredential(clientId, clientSecret);
    This case I already got token. But then got stuck again in
    using (var client = new PowerBIClient(new Uri(apiUrl), tokenCredentials)) { var groups = client.Groups.GetGroups(); }. It said Microsoft.Rest.HttpOperationException: 'Operation returned an invalid status code 'Forbidden''.

I wonder that this sample is for Native ?

I have an error

Hi, I execute program with Visual Studio 2015, but I have an error!!

I can´t generate my token for Power BI Javascript!!
Thanks!
This is my error:
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll' cargado.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'E:\N I N A\TRABAJOS\OTHER\clo.cl\MATERIAL\TOKEN\Embed-API-Sample-master\EmbedAPISample\bin\Debug\EmbedAPISample.vshost.exe' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http.WebRequest\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.WebRequest.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_es_b77a5c561934e089\mscorlib.resources.dll' cargado. El módulo se compiló sin símbolos.
El subproceso 0x14cc terminó con código 0 (0x0).
El subproceso 0x4610 terminó con código 0 (0x0).
El subproceso 0x27bc terminó con código 0 (0x0).
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'E:\N I N A\TRABAJOS\OTHER\clo.cl\MATERIAL\TOKEN\Embed-API-Sample-master\EmbedAPISample\bin\Debug\EmbedAPISample.exe' cargado. Símbolos cargados.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'E:\N I N A\TRABAJOS\OTHER\clo.cl\MATERIAL\TOKEN\Embed-API-Sample-master\EmbedAPISample\bin\Debug\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'E:\N I N A\TRABAJOS\OTHER\clo.cl\MATERIAL\TOKEN\Embed-API-Sample-master\EmbedAPISample\bin\Debug\Microsoft.IdentityModel.Clients.ActiveDirectory.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'E:\N I N A\TRABAJOS\OTHER\clo.cl\MATERIAL\TOKEN\Embed-API-Sample-master\EmbedAPISample\bin\Debug\Microsoft.Rest.ClientRuntime.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'E:\N I N A\TRABAJOS\OTHER\clo.cl\MATERIAL\TOKEN\Embed-API-Sample-master\EmbedAPISample\bin\Debug\Microsoft.PowerBI.Api.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading.Tasks\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.Tasks.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Globalization\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Globalization.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.RegularExpressions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.RegularExpressions.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Primitives\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Primitives.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Extensions.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Collections.Concurrent\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.Concurrent.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Json\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Json.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.Encoding\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.Encoding.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Primitives\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Primitives.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Linq\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Linq.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.XDocument\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Xml.XDocument.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.resources\v4.0_4.0.0.0_es_b77a5c561934e089\System.resources.dll' cargado. El módulo se compiló sin símbolos.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Extensions.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
Excepción producida: 'System.Net.Http.HttpRequestException' en Microsoft.IdentityModel.Clients.ActiveDirectory.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.HttpRequestWrapperException' en Microsoft.IdentityModel.Clients.ActiveDirectory.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.HttpRequestWrapperException' en mscorlib.dll
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.Encoding.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.Encoding.Extensions.dll' cargado. No se encuentra el archivo PDB o no se puede abrir.
'EmbedAPISample.vshost.exe' (CLR v4.0.30319: EmbedAPISample.vshost.exe): 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.resources\v4.0_4.0.0.0_es_b77a5c561934e089\System.Runtime.Serialization.resources.dll' cargado. El módulo se compiló sin símbolos.
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en Microsoft.IdentityModel.Clients.ActiveDirectory.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en mscorlib.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en mscorlib.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en mscorlib.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en mscorlib.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en Microsoft.IdentityModel.Clients.ActiveDirectory.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en mscorlib.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en mscorlib.dll
Excepción producida: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' en mscorlib.dll
Excepción producida: 'System.AggregateException' en mscorlib.dll
El subproceso 0x217c terminó con código 0 (0x0).
El subproceso 0x4710 terminó con código 0 (0x0).
El programa '[7824] EmbedAPISample.vshost.exe: Seguimiento de programa' terminó con código 0 (0x0).
El programa '[7824] EmbedAPISample.vshost.exe' terminó con código 0 (0x0).

I can't get this getting token thing to work

I found this from watching this Video...

I registered the app (at this URL https://dev.powerbi.com/apps), and I got a Client ID.

I opened up the source code, replaced everything that needed to be replaced, but the message I get when running this is

"The user or administrator has not consented to use the application with ID '***' named '***'. Send an interactive authorization request for this user and resource."

I have not been able to find anything that explains what that means, or what I need to do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.