Azure AD Sign In -
i have web application secured azure ad. able allow people access application. have created account in directory these users , log them in without doing redirect azure ad.
is there way azure auth cookie , allow them access application without redirecting them login? know username / password , able sign in behind scenes.
you should able use resource owner credentials flow. assuming you're using adal, can leverage this sample app retrieve token.
once have authentication result, can use build identity , pass cookie authentication manager (assuming you're using owin cookie authentication middleware).
var claims = new list<claim>(); claims.add(new claim(claimtypes.givenname, result.userinfo.givenname)); var id = new claimsidentity(claims, defaultauthenticationtypes.applicationcookie); var ctx = request.getowincontext(); var authenticationmanager = ctx.authentication; authenticationmanager.signin(id);
Comments
Post a Comment