IdentitySet.cs does not contain a Phone property

Open Beginner friendly
#3,004 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
csharp
Domain
api

Research direction

Start with IdentitySet.cs and the CallRecords participant models referenced by ParticipantsV2 and OrganizerV2. Reproduce the compile-time failure using the CallRecord request and verify that a returned participant exposes the phone identity alongside User; done means the documented selection compiles against the SDK.

Written by the indexing model from the issue text.

Description

Bug: metadata
Describe the bug

When I call the /v1.0/communications/callRecords/{id}, the participants object can contain a "user" or a "phone". However, the SDK does not recognize this.

"participants": [
{
"spoolApplicationInstance": null,
"applicationInstance": null,
"acsApplicationInstance": null,
"application": null,
"phone": null,
"acsUser": null,
"spoolUser": null,
"user": {
"displayName": "xxx",
"tenantId": "xxx",
"id": "xxx"
},
"device": null,
"encrypted": null,
"guest": null,
"onPremises": null
},
{
"spoolApplicationInstance": null,
"acsApplicationInstance": null,
"applicationInstance": null,
"user": null,
"application": null,
"phone": {
"displayName": null,
"tenantId": null,
"id": "xxx"
},
"acsUser": null,
"spoolUser": null,
"device": null,
"encrypted": null,
"guest": null,
"onPremises": null
}
]

Error in Visual Studio: 'IdentitySet' does not contain a definition for 'Phone' and no accessible extension method 'Phone' accepting a first argument of type 'IdentitySet' could be found (are you missing a using directive or an assembly reference?)

This exists in the Identity property of ParticipantsV2 and OrganizerV2, but these are not returned by the call to CallRecords today.

Expected behavior

A call record should return a CallRecord object with a valid Participant phone, e.g.,

var id= record.Participants?.Select(x => x.User ?? x.Phone)

How to reproduce

Make Graph API call to CallRecord:

    _graphClient
    .Communications
    .CallRecords[id]
    .GetAsync();```

Attempt to return participant phone property:

`var id= record.Participants?.Select(x => x.User ?? x.Phone)`

### SDK Version

5.93.0

### Latest version known to work for scenario above?

_No response_

### Known Workarounds

None. 

### Debug output

<details><summary>Click to expand log</summary>

1>xxx\capture-teams-calls.cs(56,168,56,173): error CS1061: 'IdentitySet' does not contain a definition for 'Phone' and no accessible extension method 'Phone' accepting a first argument of type 'IdentitySet' could be found (are you missing a using directive or an assembly reference?)

</details>


### Configuration

- OS: Windows 11
- architecture: x64

### Other information

The Microsoft.Graph.Models.IdentitySet class should contain a Phone property that mimics the User property.
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoftgraph/msgraph-sdk-dotnet

All issues in microsoftgraph/msgraph-sdk-dotnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.