forked from microsoft/PowerBI-CSharp
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
submitting http request returns html "Continue" page #3
Comments
Ok, thanks for the additional info. I'll look into it. |
Hi I just tested with a blank console application and it just works. Try logging in with the account via a browser and see if you get any errors / warnings. I have not yet ported the most recent SDK to netstandard so perhaps there are some changes in it. Are you sure you are using "application/x-www-form-urlencoded" as per the sample code? |
Hi Benny,
Thank you for your reply. I just tested in a browser and it works fine although it uses MFA. Would that be an issue in this case? I didn't think about it since it worked fine when I entered it in the sample AppOwnsData app provided by Microsoft. Would it be different using REST?
Thanks again,
Paul
…________________________________
From: Benny Michielsen <notifications@github.com>
Sent: Friday, July 27, 2018 2:47 PM
To: BennyM/PowerBI-CSharp
Cc: pleepaul; Author
Subject: Re: [BennyM/PowerBI-CSharp] submitting http request returns html "Continue" page (#3)
Hi
I just tested with a blank console application and it just works. Try logging in with the account via a browser and see if you get any errors / warnings.
I have not yet ported the most recent SDK to netstandard so perhaps there are some changes in it. Are you sure you are using "application/x-www-form-urlencoded" as per the sample code?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBennyM%2FPowerBI-CSharp%2Fissues%2F3%23issuecomment-408506940&data=02%7C01%7C%7Cdfef07256b414886105308d5f3f15af6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683140288912774&sdata=0xKsCYNGOBo5uvYoffFR%2BOLw9ty%2FroRrMWEQd2%2FAk%2FY%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALitGlAH1lQi8E5mHnwJ-EMRSWOzT5CMks5uK2AqgaJpZM4VihiQ&data=02%7C01%7C%7Cdfef07256b414886105308d5f3f15af6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683140288912774&sdata=LjS%2BUmcZB52dsvx4xEaoQJZqqD1iaQ5gzqb%2Fhv3oS8w%3D&reserved=0>.
|
That will be the issue, you need an “admin account” that does not require MFA. PowerBI does not know that it’s actually an application: https://docs.microsoft.com/en-us/power-bi/developer/get-azuread-access-token#access-token-for-non-power-bi-users-app-owns-data
Benny
… On 28 Jul 2018, at 00:09, pleepaul ***@***.***> wrote:
Hi Benny,
Thank you for your reply. I just tested in a browser and it works fine although it uses MFA. Would that be an issue in this case? I didn't think about it since it worked fine when I entered it in the sample AppOwnsData app provided by Microsoft. Would it be different using REST?
Thanks again,
Paul
________________________________
From: Benny Michielsen ***@***.***>
Sent: Friday, July 27, 2018 2:47 PM
To: BennyM/PowerBI-CSharp
Cc: pleepaul; Author
Subject: Re: [BennyM/PowerBI-CSharp] submitting http request returns html "Continue" page (#3)
Hi
I just tested with a blank console application and it just works. Try logging in with the account via a browser and see if you get any errors / warnings.
I have not yet ported the most recent SDK to netstandard so perhaps there are some changes in it. Are you sure you are using "application/x-www-form-urlencoded" as per the sample code?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBennyM%2FPowerBI-CSharp%2Fissues%2F3%23issuecomment-408506940&data=02%7C01%7C%7Cdfef07256b414886105308d5f3f15af6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683140288912774&sdata=0xKsCYNGOBo5uvYoffFR%2BOLw9ty%2FroRrMWEQd2%2FAk%2FY%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALitGlAH1lQi8E5mHnwJ-EMRSWOzT5CMks5uK2AqgaJpZM4VihiQ&data=02%7C01%7C%7Cdfef07256b414886105308d5f3f15af6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683140288912774&sdata=LjS%2BUmcZB52dsvx4xEaoQJZqqD1iaQ5gzqb%2Fhv3oS8w%3D&reserved=0>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thank you Benny. I tried on a test tenant without MFA and it does indeed work. I will try to request an non-MFA account from my organization tenant to test. Thank you for all your help!
________________________________
From: Benny Michielsen <notifications@github.com>
Sent: Saturday, July 28, 2018 12:57 AM
To: BennyM/PowerBI-CSharp
Cc: pleepaul; Author
Subject: Re: [BennyM/PowerBI-CSharp] submitting http request returns html "Continue" page (#3)
That will be the issue, you need an “admin account” that does not require MFA. PowerBI does not know that it’s actually an application: https://docs.microsoft.com/en-us/power-bi/developer/get-azuread-access-token#access-token-for-non-power-bi-users-app-owns-data
Benny
On 28 Jul 2018, at 00:09, pleepaul ***@***.***> wrote:
Hi Benny,
Thank you for your reply. I just tested in a browser and it works fine although it uses MFA. Would that be an issue in this case? I didn't think about it since it worked fine when I entered it in the sample AppOwnsData app provided by Microsoft. Would it be different using REST?
Thanks again,
Paul
________________________________
From: Benny Michielsen ***@***.***>
Sent: Friday, July 27, 2018 2:47 PM
To: BennyM/PowerBI-CSharp
Cc: pleepaul; Author
Subject: Re: [BennyM/PowerBI-CSharp] submitting http request returns html "Continue" page (#3)
Hi
I just tested with a blank console application and it just works. Try logging in with the account via a browser and see if you get any errors / warnings.
I have not yet ported the most recent SDK to netstandard so perhaps there are some changes in it. Are you sure you are using "application/x-www-form-urlencoded" as per the sample code?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBennyM%2FPowerBI-CSharp%2Fissues%2F3%23issuecomment-408506940&data=02%7C01%7C%7Cdfef07256b414886105308d5f3f15af6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683140288912774&sdata=0xKsCYNGOBo5uvYoffFR%2BOLw9ty%2FroRrMWEQd2%2FAk%2FY%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALitGlAH1lQi8E5mHnwJ-EMRSWOzT5CMks5uK2AqgaJpZM4VihiQ&data=02%7C01%7C%7Cdfef07256b414886105308d5f3f15af6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683140288912774&sdata=LjS%2BUmcZB52dsvx4xEaoQJZqqD1iaQ5gzqb%2Fhv3oS8w%3D&reserved=0>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBennyM%2FPowerBI-CSharp%2Fissues%2F3%23issuecomment-408582851&data=02%7C01%7C%7Cd8e74368f03c4858054908d5f446a7e3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683506652643471&sdata=v4r55QUMkVl32G2aODLCix8LSRJc3jCwGzPhczrh4kc%3D&reserved=0>, or mute the thread<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALitGoBAckJIcE9RDeedtm26-Q5v_t-tks5uK-9GgaJpZM4VihiQ&data=02%7C01%7C%7Cd8e74368f03c4858054908d5f446a7e3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636683506652643471&sdata=RhsnFIntGI2YVx98i1ooCcQuO3QGGM4L8alKWrrRNi4%3D&reserved=0>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I have the exact issue of .net core not accepting UserPasswordCredential() and when I follow your code, I get a html response instead of json. My username and password should be fine since it works when I use it in the AppOwnsData example. Here is what I get when running the program (it actually fails then the program tries to parse the html as JSON) . I get the same thing when I try to run this request in postman.
<title>Continue</title>Script is disabled. Click Submit to continue
<script language="javascript">window.setTimeout('document.forms[0].submit()', 0);</script>Thank you for your help!
Regards,
Paul
The text was updated successfully, but these errors were encountered: