Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

Retrieving Domain and user name

Last post 04-01-2008, 6:22 PM by joe. 5 replies.
Sort Posts: Previous Next
  •  03-31-2008, 3:00 PM 2978

    Retrieving Domain and user name

    Hi,

    In our case, the c# command HttpContext.Current.User.Identity.Name returns 'urn:federation:adatum\AdamCar@adatum.com'. Is there a way to retrieve only the domain and username or we have to manipulate de string to extracte the info we want.

     

    Thanks

  •  04-01-2008, 9:56 AM 2987 in reply to 2978

    Re: Retrieving Domain and user name

    Is this a token app or claims-aware app?  Also, if it is a token app and the users are from an external realm, what is the token mapping strategy?  Are you using shadow accounts or shadow groups?
  •  04-01-2008, 10:16 AM 2989 in reply to 2987

    Re: Retrieving Domain and user name

    It is a Token app.

    Shadow groups.

  •  04-01-2008, 11:03 AM 2993 in reply to 2989

    Re: Retrieving Domain and user name

    With token app and shadow groups, there IS no actual domain user name because there was no domain user used to build the token.  The only thing you have to represent the user name is what is supplied in that string.
  •  04-01-2008, 1:12 PM 2996 in reply to 2993

    Re: Retrieving Domain and user name

    Joe,

    Is there a way to put the e-mail adress of our business partner into the token? If yes, how to put the e-mail into it and how to retrieve it?

    Thanks

  •  04-01-2008, 6:22 PM 3003 in reply to 2996

    Re: Retrieving Domain and user name

    You could try using Mail as the identity claim instead of UPN.  That's the only thing I can think of here.

    The alternate approach would be to make the app claims-aware instead of token based.  Then you get more flexibility.

View as RSS news feed in XML