gpt4 book ai didi

azure - 如何设置 Azure AD 用户 "Preferred language"属性?

转载 作者:行者123 更新时间:2023-12-03 06:12:07 24 4
gpt4 key购买 nike

在用户属性选项卡中,首选语言字段显示在“身份”部分中。但是当我想编辑身份部分时,首选语言字段不会出现。如何更新首选语言字段?

enter image description here

enter image description here

最佳答案

Note that, there are few user properties like preferred language where you cannot update them directly from Azure Portal. In such cases, make use of Microsoft Graph queries or PowerShell commands.

我有一个名为 Sri 的 Azure AD 用户,其中首选语言未按如下方式设置:

enter image description here

为了更新上述用户的首选语言字段,我在 Graph Explorer 中运行了 MS Graph 查询。通过授予所需的权限,如下所示:

PATCH https://graph.microsoft.com/v1.0/users/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5221203b122a2a2a2a2a2a2a2a2a7c3d3c3f3b31203d213d34267c313d3f" rel="noreferrer noopener nofollow">[email protected]</a>/
{
"preferredLanguage": "en-US"
}

回应:

enter image description here

当我通过刷新页面在门户中检查相同内容时,首选语言字段已成功更新,如下所示:

enter image description here

同样,您可以使用以下 MS Graph PowerShell 命令来设置 Azure AD 用户“首选语言”属性:

Connect-MgGraph
Import-Module Microsoft.Graph.Users
$userId = "xxxxx-xxx-xxx-xxx-xxxxxxxx"
$params = @{
preferredLanguage = "en-US"
}
Update-MgUser -UserId $userId -BodyParameter $params

回应:

enter image description here

引用:

Microsoft Graph Getting preferred language - Microsoft Q&A by soumi-MSFT

关于azure - 如何设置 Azure AD 用户 "Preferred language"属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76645493/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com