Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have been following the training exercise in https://docs.microsoft.com/en-us/power-bi/learning-catalog/developer-online-course
Module 4: Embedding content (Part 2/5) uses the Power BI Embed Tool https://app.powerbi.com/embedsetup
When I debug the solution provided by the tool I encouter the following error in the browser:
Error Parsing WS metadata exchange failed
This is associated with a message in the console;
Exception thrown: 'System.AggregateException' in mscorlib.dll
Adding a breakpoint to the exceptions allows me to catch the exception:
System.AggregateException
HResult=0x80131500
Message=One or more errors occurred.
Source=mscorlib
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at PowerBIEmbedded_AppOwnsData.Services.EmbedService.<DoAuthentication>d__24.MoveNext() in C:\Users\<user ID>\Desktop\Power BI\PowerBIDevIAD\MySolution\Sample\App Owns Data\PowerBIEmbedded_AppOwnsData\Services\EmbedService.cs:line 331
Inner Exception 1:
AdalException: Parsing WS metadata exchange failed
Inner Exception 2:
XmlException: 'JavaScript' is an unexpected token. The expected token is '"' or '''. Line 24, position 18.
The error is occuring during a call to AcquireTokenAsync in Services\EmbedService.cs as per below
private async Task<AuthenticationResult> DoAuthentication()
{
AuthenticationResult authenticationResult = null;
if (AuthenticationType.Equals("MasterUser"))
{
var authenticationContext = new AuthenticationContext(AuthorityUrl);
// Authentication using master user credentials
var credential = new UserPasswordCredential(Username, Password);
authenticationResult = authenticationContext.AcquireTokenAsync(ResourceUrl, ApplicationId, credential).Result;
As far as I can see a string contining 'JavaScript' is not a being passed to AcquireTokenAsync so this is some sort of internal issue.
I don't think screen shots will help, here’s what I have managed to figure out about the error.
The exception is documented here, which tells us nothing useful about the error
However I did figure out that this is the same error that occurs if I call AcquireTokenByUsernamePassword(). I was then able to locate the following details about the error:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.identity.client.msalerror?view=azure-dotnet
So the issue is that I am using a federated account. Amusingly to fix the issue it suggests I do nothing, 🤔 not a terribly helpful suggestion, obviously to mitigate the error I need to use an alternative account.
I went back to the main page for the course (https://docs.microsoft.com/en-us/power-bi/learning-catalog/developer-online-course#self-study-kit) and down the bottom of the page (where I had not got up to yet) I find this note:
So I ditch my work account, sign up for a free account at outlook live and sign up to Power BI free trial, only to find out that actually you need a work account to get a trial version of power BI 😖. To which I don't have a solution and honestly I have wasted way too much time trying to get round all the issues rather than just learning Power BI.
To summarise there are far too many roadblocks to what is supposed to be a single day course. I would like to see MS take the following actions:
At the very least hopefully my post will help other facing the same or related issues.
Hi @Anonymous ,
Please provide screenshots related to the error.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |