cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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

Accepted Solutions
Highlighted
Helper I
Helper I

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

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
Highlighted
Microsoft
Microsoft

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

@vinayakz86

 

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?
 

Highlighted
Helper I
Helper I

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

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

Highlighted
Helper I
Helper I

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

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

Highlighted
Microsoft
Microsoft

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

@vinayakz86

 

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.
 

Highlighted
Helper I
Helper I

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

@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"?

Highlighted
Microsoft
Microsoft

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

@vinayakz86

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?
 

Highlighted
Helper I
Helper I

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

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>

Highlighted
Microsoft
Microsoft

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

@vinayakz86

 

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.
 

Highlighted
Helper I
Helper I

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

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

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.