Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Credentials are missing in ASP.NET-web-app-sample

Hi Team,

 

I am recently started using Power BI for my project activities. 

I was trying to run the sample code provided at https://github.com/Microsoft/PowerBI-CSharp/tree/master/samples/webforms/get-started-web-app-asp.net and https://msdn.microsoft.com/en-us/library/mt186158.aspx

 

However it keeps giving me error as,

Your credentials could not be authenticated: \"Credentials are missing.\". You will not be permitted access until your credentials can be verified.

 

Please provide me pointers on how I can get rid of this error and move to integrate a report into web app.

 

Please see the error screenshots attached.Error1.jpgError2.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Eric_Zhang,

 

The problem has been fixed now 🙂

It was because of proxy server used in my organisation.

Adding below settings to web config did the trick.

 

<system.net>

<defaultProxy useDefaultCredentials="true">

<proxy proxyaddress="yourproxyaddress" bypassonlocal="True"/>

</defaultProxy>

</system.net>

 

Hope this helps some one who might encounter this error in future.

 

Thanks,

Vinayak

 

View solution in original post

9 REPLIES 9
Eric_Zhang
Employee
Employee

@Anonymous

 

The code shows actually you were playing with demo integrate-report-web-app, and the first picture shows the clientid and secretid are valid. When was this exception triggered, after clicking accept button in picture 1 ?

By the way, the sample is kind of straightforward and I don't get any issue when playing with it. Have you changed any code in the sample? How is it going if you try to re-download and re-open the sample project?
 

Anonymous
Not applicable

Hi @Eric_Zhang,

 

Thanks for your reply.

 

Yes I get this error on hitting the accept button.

I have only updated the web config entries and nothing else in the sample code. 

 

I even watched couple of youtube videos where the users are just doing the things and it works as expected.

But unfortunately it is not working in my scenario.

 

One thing I noticed while debugging was that, on running the application, it goes for windows live authentication and it passes that authentication and then asks for the permission required by app. On hitting accept button I get the attached error.

 

I have also tried to run each and every application available in sample code, but it gives the same error.

 

Is there anything that I need to check from my machine configuration or something. Just to let you know I am using my organisation machine in my organisation's network.

 

Thanks,

Vinayak

Anonymous
Not applicable

Can someone please look into my problem and provide me with some pointers.

I am stuck into this problem for long time now and cannot progress further to integrate reports into a .net web application.

 

Thanks,

Vinayak

@Anonymous

 

What Azure AD account you're using? Can you login powerbi.com with that account? Ensure that there's at least one free power bi licence is subscriped to that account.
 

Anonymous
Not applicable

@Eric_Zhang,

 

My azure account is valid and I can login to powerbi.com with this account.

I have MSDN Visual Studio Enterprise subscription linked to this account.

I am not sure what do you mean by "at least one free power bi licence is subscriped to that account"?

@Anonymous

I mean
Login on this page and check 
Capture.PNG

Capture2.PNG

 

 

And ensure that, when playing with that demo, you registered the application for Power BI as
Capture.PNG

 

By the way, I see "Additional information:<HTML><HEAD><TITLE>...." in the exception message, would you mind post the whole message?
 

Anonymous
Not applicable

Hi @Eric_Zhang,

 

Thank you for the reply.

Yes my account does have Free Power BI license.

I have used the settings mentioned by you while creating the app, but unfortunately it still does not work.

Would you be able to create a support ticket for this problem? Or provide me with a support email address to whom I can send the details or have a screen sharing session to trouble shoot.

 

The detailed error message is given below,

 

An exception of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' occurred in Microsoft.IdentityModel.Clients.ActiveDirectory.dll but was not handled in user code

Additional information:
<html>
<head>

<title>Access Denied</title>

</head>

<body>

<font face="Helvetica">

<big><strong></strong></big><br>

</font>

<blockquote>

<table border=0 cellpadding=1 width="80%">

<tr>
<td>

<font face="Helvetica">

<big>Access Denied (authentication_failed)</big>

<br>

<br>

</font>

</td>
</tr>

<tr>
<td>

<font face="Helvetica">

Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.

</font>

</td>
</tr>

<tr>
<td>

<font face="Helvetica">

This is typically caused by an incorrect username and/or password, but could also be caused by network problems.

</font>

</td>
</tr>

<tr>
<td>

<font face="Helvetica" size=2>

<br>

For assistance, contact your network support team.

</font>

</td>
</tr>

</table>

</blockquote>

</FONT>

</body>
</html>

@Anonymous

 

Thanks for posting that addtional infomation. Per the detailed message, it seems an Azure AD authentication problem then. I'd suggest you post your question with all the details in this table in the Azure AD forum for a better result. Kindly share any update if you get.
 

Anonymous
Not applicable

Hi @Eric_Zhang,

 

The problem has been fixed now 🙂

It was because of proxy server used in my organisation.

Adding below settings to web config did the trick.

 

<system.net>

<defaultProxy useDefaultCredentials="true">

<proxy proxyaddress="yourproxyaddress" bypassonlocal="True"/>

</defaultProxy>

</system.net>

 

Hope this helps some one who might encounter this error in future.

 

Thanks,

Vinayak

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors