I would like to redirect user depending on their description AD attribute.
I'm building a ASPX page (with vb.net), and I ask them for their credentials.
Then I create a user context like this :
Dim user As UserPrincipal
Using ctx As New PrincipalContext(ContextType.Domain, "MYDOMAIN", txtUsername.Text, txtPassword.Text)
user = UserPrincipal.FindByIdentity(ctx, txtUsername.Text)
End Using
So I'm able to test user.Description
, and I'm able to redirect them to another page with :
HttpContext.Current.Response.Redirect(urltoredirect)
But as its SharePoint, I redirect them to another site collection, so it's asking for their credentials. Creds that I've just asked them and I have in my code.
Is there a way to send these creds along with the redirection ? To create a kind of SSO ?
P.S: For more details, I'm trying to creating an custom login page, that will redirect user to a EULA Disclaimer & a Change Password page if this is their first visit, and if not, Redirecting them to their site collection according to their Description attribute. This is for extranet purpose.
EDIT1: I gave a try according to Making a web request to a web page which requires windows authentication but none if these solutions seem to work.