I have a WCF service that is currently being passed in a username and password, is there a way I can validate these credentials against my sample azure active directory user list ?
Im currently trying the following , but it just returns bad request. could someone point me in the right direction
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(String.Format(StringConstants.AzureADSTSURL, tenantName));
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
string postData = "grant_type=password";
postData += "&resource=" + HttpUtility.UrlEncode(StringConstants.GraphPrincipalId);
postData += "&client_id=" + HttpUtility.UrlEncode(appPrincipalId);
postData += "&username=" + HttpUtility.UrlEncode("UserName");
postData += "&client_secret=" + HttpUtility.UrlEncode(secret);
postData += "&password=" + HttpUtility.UrlEncode("Userpassword");