London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Windows Authentication / user info

Vote:
0

Version: EPiServer CMS 6

When using windows authentication with EPiServer, to get fullname and email address from the current user, do I need to query the active directory to retrieve this info? (i.e. System.DirectoryServices) This info isn't avaiable in any other fashion?

Thanks,
Magnus

#43139
Sep 15, 2010 14:11
Vote:
0

No I don't think it is readily available anywhere else. The MembershipUser object is rather "thin" and I guess the ProfileBase subclasses are the objects meant to carry extended user info. There's no Windows/AD profile provider that I know of, but you could probably create your own which reads from directory services (or use some more direct way of getting that info).

#43163
Sep 15, 2010 14:36
Vote:
0

EPiServer 5 has a AD membership provider:

http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-SP2/Configuring-EPiServer-CMS-5-to-Use-Active-Directory-Membership-Provider/#Introduction

That could allow you to access the information you want. Its meant for EPiServer 5 but its a standard Membership provider so should plug straight into EPiServer 6

#43741
Sep 22, 2010 15:30
Vote:
0

Thanks for the info. EPiServer recommends using Windows Authentication (due to performance), so I guess using this AD Membership Provider wouldn't be ideal?

I'm now doing a sort of workaround, while using Windows Authentication, at the start of a user session I'm querying the AD for the info I need (name and email) and storing it in the sqlprofile. I'm not sure if this is any better though...

#43791
Sep 23, 2010 15:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.