microsoftgraph / microsoftgraph/msgraph-sdk-python

IdentitySet class does not have 'phone' property

未关闭
#1,424 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

dependency:metadata type:bug
主要语言
Python
星标
630
派生
96
平均合并
15 小时 20 分钟
30 天内合并 PR
3

描述

Describe the bug

When trying to make a phone call, I specify the IdentitySet of the Target user like this:

    targets = [
        InvitationParticipantInfo(
            identity = IdentitySet(
                phone = Identity(
                    id = "+mynumber"
                )
            )
        )
    ]

However I get the following error "IdentitySet.init() got an unexpected keyword argument 'phone'" stating that this parameter is not available for the IdentitySet class.
This works when calling from the rest API

Expected behavior

Parameter should be present in the class, just like the user parameter for calling an teams userid

How to reproduce
target_identity = IdentitySet(phone=Identity(id=graph_p.phone_number))
target = InvitationParticipantInfo(
    identity = target_identity
)
request_body = Call(
    callback_uri = "myballback",
    tenant_id = tenant_id,
    source = ParticipantInfo(
        identity = IdentitySet(
            application = Identity(
                id = bot_instance_id
            )
        )
    ),
    targets = [target],
    requested_modalities = [Modality.Audio],
    media_config = ServiceHostedMediaConfig(
        pre_fetch_media = []
    )
)
SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

Use IdentitySet additional_data parameter in order to inject the phone parameter to the body

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 IdentitySet 模型入口开始,复现 issue 中的 IdentitySet(phone=Identity(...)) 构造。将支持的构造函数参数与 REST API 的形状进行比较,并验证无需使用 additional_data,即可在生成的请求体中表示 phone 目标。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。