Forum Discussion
pritesho
10 years agoHelper I
Single Signon from company website
I am trying to implement single signon per website user for our front end app so users don't have to log in the website twice. I tried to use below code from Prologika site, however it fails on w...
- 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;
pritesho
10 years agoHelper I
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;