How to pull Active Directory information about current user from Infopath

Hi,

I am new to Infopath. I have this requirement that when I open the Infopath form, fields like ID, Name, Department etc should pull in data automatically from Active Directory. Could someone help?

thanks in advance,
j1981Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Clay FoxDirector of Business IntegrationCommented:
Several ways at this.
InfoPath has a builtin function called Username() which returns the local account name.
If you have an HR system or other record then you can use that to look up additional information.

SharePoint has a getuserprofile web service which will return the basic information which is synced from AD.

www.qdabra.com has an AD webservice which will allow you to query anything in AD without code or anything.  You may need this if you are using custom fields in AD.

Hope that gets you started.
0
j1981Author Commented:
"SharePoint has a getuserprofile web service which will return the basic information which is synced from AD." -- I think this is the solution that may work.

Could you guide me further on how to go about this? thank you in advance.
0
j1981Author Commented:
The solution at the link http://msdn.microsoft.com/en-us/library/bb952744(v=office.12).aspx worked for me.

thanks for offering to help.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
j1981Author Commented:
I realized later that this solution woudl work only where the security level of the Infopath form can be set to "Full Trust" which was not so in my network. This was because this solution employs code

Thankfully, I got the name of another webservice I could use in our organization, and got this working.

So this is not a perfect solution, but will work in cases where your forms can have "Full Trust"
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
InfoPath

From novice to tech pro — start learning today.