我想在提取时从下面的代码中拉用户的部门

我想在提取时从下面的代码中拉用户的部门

本文介绍了我想在提取时从下面的代码中拉用户的部门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我与具有权限的用户一起为整个Web应用程序拉出报告.我可以使用以下代码提取数据.但我想在最后一列中拉出用户部门.我已经提取了登录名和显示名.我尝试了 通过替换Department来更改Department,但是在最后一列中获取空值.请在下面找到代码,

Hi, Im pulling the Report for whole web application with the users who has permission. I can able to pull the datas with below code. but Iwant to pull the department of the user in the last column. I have pulled login name and display name. and I tried with Department everywher by replacing Department but im getting empty values in the last column. Please find the code below,

有人可以帮助获取Web应用程序/站点集合/子站点/列表等部门或诸如"User.Department"之类的语法吗?我已经尝试过了,但是没有用.

Can Someone help getting the department for webapplication/site colection/ subsite/ list etc. or syntax like "User.Department" I have tried that but its not working.

Saravanan

Saravanan

推荐答案

检查以下文章是否可帮助您获取SharePoint 2010中已登录用户的部门

Check if the below articles helps you getting the Department of logged in user in SharePoint 2010

https://social.technet.microsoft.com/wiki/contents/articles/20692.sharepoint-2013-get-set-and-copy-user-profile-properties-using-powershell. aspx

https://social.technet.microsoft.com/wiki/contents/articles/20692.sharepoint-2013-get-set-and-copy-user-profile-properties-using-powershell.aspx

如果是SP 2013,则可以使用REST API轻松获取所有用户属性:

If it is SP 2013, you can use REST API to get all user properties easily:

参考文章:在SharePoint REST API中获取当前用户属性

Reference article: Get Current User Properties in SharePoint REST API 


这篇关于我想在提取时从下面的代码中拉用户的部门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 19:25