Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to get the user's department by .net portal sdk?

Hi ,all

I use the .net portal sdk to create some iViews in portal now. I can use this code to get user name:

" this.Label1.Text = this.User.Identity.Name "

But I don't know how to get the department of the user.

how to do ?thanks

Former Member


You need to use the UserManagment service.

See <a href="'s%20Guide%20PDK%202.0%20for%20.NET/Programming%20with%20PDK%20for%20.NET/Working%20with%20Portal%20Components%20and%20Services/Accessing%20Portal%20Services.htm">this</a> on how to use services in the PDK.

So the create a UserManagment object, and use the GetUser method to get the <a href="'s%20Guide%20PDK%202.0%20for%20.NET/Reference/SAP.Portal.Services.UserManagement.UserInfo.html">UserInfo</a> object of this user. This has a "Department" property.



Message was edited by: Ofer Feldman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question