microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Issue with type changes on Graph Sdk model classes
@jsweiler is already working on this.
Since Mar 22, 2024.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
In one of the recent Graph sdk updates (Microsoft.Graph.Communications.Calls package) many of the models were moved from the Microsoft.Graph namespace to Microsoft.Graph.Models namespace.
However some of the notification updates that our app gets do not have the .models namespace in the json. Depending on how you deserialize the json you will get a null result. One example is when an audio prompt is completed playing currently with the latest sdk (version 1.2.0.10115) you get a notification like this
[ { "@odata.type": "#microsoft.graph.mediaPrompt", "mediaInfo": { "@odata.type": "#microsoft.graph.mediaInfo", "uri": "uriStrippedFor Privacy", "resourceId": "resourceId stripped for privacy" } } ]
(This is the prompts array which shows prompts which just completed and is inside the PlayPromptOperation type). But notice both of the odata.types do not match up with the current .models namespace.
Another example is when handling the CallsOnIncoming event. In the incoming call it contains this info about the resource id of the call.
{ "@odata.type": "#microsoft.graph.identity", "id": "369ebe19-93ba-46da-aa2b-c473034c9a64", "tenantId": "1aad987e-533b-4c16-83c1-13359661d26d", "identityProvider": "AAD" }
Again notice that the type is microsoft.graph.identity and the actual type in the sdk is now microsoft.graph.models.identity. I'm wondering if this was intended or just overlooked?
I realize there are ways to deserialize that can handler either way, but also depending on how the application handles it this breaks it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.