microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

Cannot process input of abstract type 'microsoft.graph.extension'

Open
#2,516 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs: Attention :wave: type:bug type:question
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Describe the bug

Hello,

I am trying to load an Extension for a Contact, Change a Value then save it, but i am getting the Error in the title.
I found this (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1723) issue before, but there, a contact is loaded and then the Extension is changed.
In my case, i am loading the Extension and nothing else.

Expected behavior

not getting an error i guess?

How to reproduce

var extension = (await _graphClient.Me.ContactFolders["MyContactFolderId"].Contacts["MyContactId"].Extensions["MyExtension"].GetAsync()) as OpenTypeExtension;
extension.AdditionalData["MyProperty"] = "MyNewValue";
await _graphClient.Me.ContactFolders["MyContactFolderId"].Contacts["MyContactId"].Extensions["MyExtension"].PatchAsync(extension);

SDK Version

5.54.0

Latest version known to work for scenario above?

Unknown

Known Workarounds

None

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


### Configuration

- OS: Windows 10
- Architecture: x64 (AMD Ryzen 7 1700)

### Other information

_No response_

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.

Research direction

Start with the reproduction in the issue using Microsoft Graph SDK .NET 5.54.0, focusing on loading an extension and then calling PatchAsync after changing AdditionalData. Trace the extension response and request handling to find why the abstract microsoft.graph.extension type is used. Done means the shown OpenTypeExtension flow patches the changed contact extension without the abstract-type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.