sharepoint - GDPR 和 SharePoint 用户查找
问题描述
(不仅)因为 GDPR,当员工离开公司时,他的所有个人数据都应该被删除。应该从 Active Directory 中删除该用户和用户本身的文件。
但是,即使用户从 AD 中删除,所有“创建者”、“修改者”和其他用户字段仍然可能包含该员工的姓名,即使对于属于其他人且不应删除的文档也是如此。
如何在不破坏依赖于这些列表中(任何)有效人员信息的 SharePoint/应用程序的情况下解决此问题?
解决方案
您可以从用户配置文件服务中清除用户的个人信息(姓名、电子邮件等),以便 SharePoint 仅引用他们的(希望是匿名的)用户 ID。
如有必要,您还可以使用 PowerShell 和客户端对象模型 (CSOM) 以“[已编辑]”之类的内容覆盖任何剩余信息(在网站集用户信息列表中捕获)。
请在此处参阅 Microsoft 的 SharePoint GDPR 合规性文档。
请按照以下基本步骤从 SharePoint Server 用户配置文件中删除用户的个人信息:
从馈入 SharePoint Server 用户配置文件的任何外部系统中删除用户信息。如果您使用目录同步,则必须从本地 Active Directory 环境中删除用户。
在 SharePoint Server 上运行配置文件同步。
从 SharePoint Server 中删除配置文件。完成此操作后,SharePoint Server 将在 30 天内从用户配置文件数据库中完全删除配置文件。用户的个人资料页面和个人网站将被删除。
删除用户的个人资料后,一些有限的信息(如用户 ID)可能仍会记录在用户访问过的网站集中。如果您选择从给定网站集中删除此数据,则可以使用 CSOM 来完成。下面提供了一个示例脚本:
$username = "<admin@company.sharepoint.com>" $password = "password" $url = "<https://site.sharepoint.com>" $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force # the path here may need to change if you used e.g. C:Lib. Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16ISAPIMicrosoft.SharePoint.Client.dll" Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16ISAPIMicrosoft.SharePoint.Client.Runtime.dll" # connect/authenticate to SharePoint Online and get ClientContext object. $clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($url) $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePassword) $clientContext.Credentials = $credentials if (!$clientContext.ServerObjectIsNull.Value) { Write-Host "Connected to SharePoint Online site: '$Url'" -ForegroundColor Green } # Get user $user = $clientContext.Web.SiteUsers.GetByLoginName("i:0#.f|membership|user@company.sharepoint.com") # Redact user $user.Email = "Redacted" $user.Title = "Redacted" $user.Update() $clientContext.Load($user) $clientContext.ExecuteQuery() # Get users $users = $clientContext.Web.SiteUsers # Remove user from site $users.RemoveById($user.Id) $clientContext.Load($users) $clientContext.ExecuteQuery()
推荐阅读
- javascript - 无法从Angular 7本地文件夹中的JSON文件中读取数据
- flutter - 如何在颤动的抽屉内再添加一个抽屉?
- r - 将多个数据框粘贴在一起,同时将数据保留在特定的行和列中
- python - 跨多个函数调用的 Python 3.8 递归函数保存列表?
- python - 在 Python3 中打印列表
- c# - 使用 Firebase 6.15.0 按下播放按钮后 Unity 冻结
- ios - 在 SwiftUI 中导航到列表视图会立即将列表向上移出屏幕
- python - 修改表达式以仅匹配绝对字符串
- tensorflow - 如何将 L2 正则化添加到 ResNet50?如何解决过拟合的问题?
- java - Docker ARGs 不会在 docker 文件中被替换