Forum Discussion
Single Signon from company website
- 10 years ago
Here is how I solved it:
I got it working finally. Below is code.Download code from here for Chapter 12: http://prologika.com/power-bi-embedded-dashboards-without-authentication-ui/Use below code to encrypt password:-var secureString = new System.Security.SecureString(); var password = "pwd here"; var charArray = password.ToCharArray(); foreach (var chara in charArray) { secureString.AppendChar(chara); } string myPassword = Util.EncryptString(secureString);Use below code, modification in above code to point to Common login path instead of TenantId based path.// perform two-leg OAuth System.Net.WebRequest request = System.Net.WebRequest.Create("https://login.microsoftonline.com/common/oauth2/token") as System.Net.HttpWebRequest;
Here is how I solved it:
var secureString = new System.Security.SecureString();
var password = "pwd here";
var charArray = password.ToCharArray();
foreach (var chara in charArray)
{
secureString.AppendChar(chara);
}
string myPassword = Util.EncryptString(secureString);Use below code, modification in above code to point to Common login path instead of TenantId based path.// perform two-leg OAuth
System.Net.WebRequest request = System.Net.WebRequest.Create("https://login.microsoftonline.com/common/oauth2/token") as System.Net.HttpWebRequest;Will it be possible to do this type of authentication in javascript?
- cuongle10 years agoAdvocate II
Yes, it's obviously possible, you can use ADAL javascript client: https://github.com/AzureAD/azure-activedirectory-library-for-js
- pritesho10 years agoHelper I
Using Power BI Embedded Azure Service. This is new and totally legit way to do it.
- Sunkari10 years agoResponsive Resident
I am little bit confused with this implementation.
Could you please some body help me on this.
1 ) I have a power bi account ([email protected]) and i have created a few dashboards there and I have one azure account ([email protected])
2) Download code from here for Chapter 12: http://prologika.com/power-bi-embedded-dashboards-without-authentication-ui/ and hosted as http://localhost:85Test/ in IIS.
3) I noticed that few things are hard coded in above solution. what details i need provided for below code and from where i need to get these details.
<PBIWebApp.Properties.Settings>
<setting name="ClientSecret" serializeAs="String">
<value>YourClientSecret</value>
</setting>
<setting name="ClientID" serializeAs="String">
<value>xxxxx</value>
</setting>
<setting name="Username" serializeAs="String">
<value>username</value>
</setting>
<setting name="Password" serializeAs="String">
<value>XXXX</value>
</setting>
</PBIWebApp.Properties.Settings>4) How add my application(http://localhost:85Test) in azure active directory