【问题标题】:How do I update the extensionAttributes for a cloud user using Microsoft Graph API如何使用 Microsoft Graph API 更新云用户的 extensionAttributes
【发布时间】:2021-02-05 11:34:53
【问题描述】:

微软的文档说明

对于 onPremisesSyncEnabled 用户,这组属性的权限来源是本地并且是只读的。对于仅限云的用户(其中​​ onPremisesSyncEnabled 为 false),可以在创建或更新期间设置这些属性。这些扩展属性也称为 Exchange 自定义属性 1-15。

我已确认此用户未同步,也从未同步过

{
    "onPremisesDistinguishedName": null,
    "onPremisesDomainName": null,
    "onPremisesImmutableId": null,
    "onPremisesLastSyncDateTime": null,
    "onPremisesSecurityIdentifier": null,
    "onPremisesSamAccountName": null,
    "onPremisesSyncEnabled": null,
    "onPremisesUserPrincipalName": null,
}

这是我的要求

Server: graph.microsoft.com
Path: /beta/users/<user id removed>
Method: PATCH

Body:
{
    "onPremisesExtensionAttributes": {
        "extensionAttribute14": "8500005",
        "extensionAttribute15": "008500005"
    }
}

回应

{
    "error": {
        "code": "Request_BadRequest",
        "message": "Unable to update the specified properties for objects that have originated within an external service.",
        "innerError": {
            "date": "...",
            "request-id": "...",
            "client-request-id": "..."
        }
    }
}

【问题讨论】:

  • 看来老用户和新用户有些不同。根据我的测试,我们可以为新创建的用户设置 extensionAttribute 1-15。但它不适用于老用户。
  • 您好,在这个问题上您还需要帮助吗?我的评论有意义吗?
  • @AllenWu 所以这看起来像是我需要与微软一起打开的案例
  • 您可以开票确认。
  • 到目前为止的响应是,无法使用 Graph API 为具有 Exchange Online 许可证的用户更新 onPremisesExtensionAttributes。因此,他们将更新文档。我仍然有票,因为我可以更新一些拥有 EXO 许可证的用户。我认为这是一个错误。

标签: azure-active-directory microsoft-graph-api microsoft-graph-sdks


【解决方案1】:

最近我们遇到了一个客户的这个问题。当我们尝试使用 Graph API 或 Power Automate 时,旧帐户会抛出此错误“无法更新源自外部服务的对象的指定属性”。

我们与客户确认他们是否早先在本地同步,但 IT 团队没有过去的信息。所以我们运行命令 Set-MsolDirSyncEnabled -EnableDirSync $false

运行此命令后,所有扩展属性 1-15 都已移至 Exchange Online。我们提出了 Microsoft 支持票以将源更改回 Azure AD。但经过 1 个月的长时间讨论后,我们被告知“不可能恢复原状”。

我们必须创建 Azure Runbook 以使用 PowerShell 更新这些扩展属性

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-05-23
相关资源
最近更新 更多