【问题标题】:Microsoft Graph API to read phone number assigned to Teams userMicrosoft Graph API 读取分配给 Teams 用户的电话号码
【发布时间】:2021-12-02 11:22:35
【问题描述】:

是否有任何 MS Graph API 可以读取分配给 Teams 用户的电话号码以进行直接路由?

【问题讨论】:

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


    【解决方案1】:

    请转至Get a user。它返回一组默认属性 businessPhones、displayName、givenName、id、mobilePhone、officeLocation 等。

    编辑:
    请通过Get-CsOnlineTelephoneNumber 从商务语音目录中检索电话号码。在Where to find the phone number assigned to a MS Teams user?

    中提出了类似的问题

    【讨论】:

    • 是的,我知道。但是,我需要通过 Teams 管理员获取分配给用户的电话号码以进行直接路由 (docs.microsoft.com/en-us/microsoftteams/…)。?
    • 这可以使用 powershell 来完成。请通过Get-CsOnlineTelephoneNumber 从商务语音目录中检索电话号码。在Where to find the phone number assigned to a MS Teams user? 中提出了类似的问题
    • 嗨@Meghana-MSFT,我无法使用 getUser api 获取直接路由电话号码。似乎只能从 microsoft power shell 中读取它。对于项目需求,我需要通过传递用户 ID 或名称从 ASP.Net 代码中获取用户的电话号码。你能建议一种方法来实现这一点吗?
    • @Priya - 这可以使用 powershell 完成。请通过Get-CsOnlineTelephoneNumber 从商务语音目录中检索电话号码。在Where to find the phone number assigned to a MS Teams user? 中提出了类似的问题
    • 嗨@Meghana-MSFT,我可以使用管理员凭据在powershell中获取分配给用户的直接路由电话号码。那不是问题。 1) 我的问题是有任何 graph api 来读取分配给用户的直接路由电话号码吗?否则 2) 我的应用程序获取一个 msal 令牌,该令牌使用用户帐户凭据生成,用于 api 访问。有什么方法可以使用用户令牌(不使用管理员帐户凭据)在 C# 代码中读取此电话号码?
    猜你喜欢
    • 2021-10-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多