how to get access token after windows azure active directory authentication
we have successfully implemented the active directory authentication using
the process given at the url
http://msdn.microsoft.com/en-us/library/windowsazure/dn151790.aspx . Here
we are able to authenticate the user on the
https://login.microsoftonline.com/ and return back to web site but we are
not able to get access token after successful authentication. following
code through which we are able to access the user name, surname etc after
successful authentication but not the access token. can you provide me the
code through which we can get the access token after authentication.
public class HomeController : Controller { public ActionResult Index() {
ClaimsPrincipal cp = ClaimsPrincipal.Current;
string fullname =
string.Format("{0} {1}",
cp.FindFirst(ClaimTypes.GivenName).Value,
cp.FindFirst(ClaimTypes.Surname).Value);
ViewBag.Message = string.Format("Dear {0}, welcome to the Expense
Note App",
fullname);
return View();
}
}
No comments:
Post a Comment