Forum Discussion
ajhops
9 years agoFrequent Visitor
Integrate tile into an app sample javascript error.
Following the steps in the sample here: https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-integrate-tile/ In the final step, load the tile into an iFrame I have a problem postin...
Eric_Zhang
9 years agoMicrosoft Employee
Have you tested with my HTML? What's going on when in IE, do you still get the atob error? May I know how you generate the accessToken?
ajhops
9 years agoFrequent Visitor
When I run in IE I get "InvalidCharacterError". I believe this is the same error as before.
To answer your question, yes I am using your static HTML but replace with my token and tile URL. I generate my access token on my back end (.net MVC) using this line:
var ar = AC.AcquireTokenByAuthorizationCodeAsync(
authorizationCode,
new Uri(redirectUri), cc).Result;
return ar.AccessToken;I later use that access token server side to get my list of dashboards and tiles, and the result is good, so I assume my token is good / correct (the variable _token below).
System.Net.WebRequest request = System.Net.WebRequest.Create(
String.Format("{0}Dashboards", _baseUri
)) as System.Net.HttpWebRequest;
request.Method = "GET";
request.ContentLength = 0;
request.Headers.Add("Authorization", String.Format("Bearer {0}", _token));- Eric_Zhang9 years agoMicrosoft Employee
Well, then I suggest you open a support ticket.