Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 49129

Re: Single Signon from company website

$
0
0

Here is how I solved it:

I got it working finally.  Below is code.
 
 
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;

Viewing all articles
Browse latest Browse all 49129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>