I know that the name of the user account can be retrieved from the built in variable User!UserID but how can I get the full user name of the user?
我知道可以从内置变量User!UserID中检索用户帐户的名称,但是如何获取用户的完整用户名?
I guess it would be possible to hook up some .NET code and do a Active Directory look up but are there any alternatives?
我想可以连接一些.NET代码并进行Active Directory查找,但还有其他选择吗?
1 个解决方案
#1
2
In one of my projects I used a table in SQL Server to store the user data from Active Directory ("displayName", "sAMAccountName", "userPrincipalName"), using a C# application for data transfer. The table was updated nightly and also after any change in Active Directory which could impact my project users.
在我的一个项目中,我使用SQL Server中的表来存储来自Active Directory的用户数据(“displayName”,“sAMAccountName”,“userPrincipalName”),使用C#应用程序进行数据传输。该表在每晚更新,也在Active Directory中的任何更改后更新,这可能会影响我的项目用户。
In my case (Infopath form hosted on Sharepoint) I was using an web service to get the account name of the current user from Sharepoint, in order to display the coresponding user full name.
在我的情况下(在Sharepoint上托管的Infopath表单)我使用Web服务从Sharepoint获取当前用户的帐户名,以显示相应的用户全名。
#1
2
In one of my projects I used a table in SQL Server to store the user data from Active Directory ("displayName", "sAMAccountName", "userPrincipalName"), using a C# application for data transfer. The table was updated nightly and also after any change in Active Directory which could impact my project users.
在我的一个项目中,我使用SQL Server中的表来存储来自Active Directory的用户数据(“displayName”,“sAMAccountName”,“userPrincipalName”),使用C#应用程序进行数据传输。该表在每晚更新,也在Active Directory中的任何更改后更新,这可能会影响我的项目用户。
In my case (Infopath form hosted on Sharepoint) I was using an web service to get the account name of the current user from Sharepoint, in order to display the coresponding user full name.
在我的情况下(在Sharepoint上托管的Infopath表单)我使用Web服务从Sharepoint获取当前用户的帐户名,以显示相应的用户全名。