microsoftgraph / microsoftgraph/msgraph-sdk-python

IdentitySet class does not have 'phone' property

Đang mở
#1,424 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

dependency:metadata type:bug
Ngôn ngữ chính
Python
Star
630
Fork
96
Merge trung bình
15 giờ 20 phút
Pull request đã merge (30 ngày)
3

Mô tả

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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu từ điểm vào của model IdentitySet và tái hiện cấu trúc IdentitySet(phone=Identity(...)) trong issue. So sánh các tham số constructor được hỗ trợ với dạng của REST API và xác minh rằng một đích phone có thể được biểu diễn trong request body được tạo mà không sử dụng additional_data.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.