Skip to content

Cannot update sponsors of user #1002

@Doc94

Description

@Doc94

Describe the bug

Im updating a user with new sponsors but in the update user throw an internal issue.

Expected behavior

Update the user with the sponsors provided

How to reproduce

Get a User class for existing user with sponsors, modify the sponsors list adding a new sponsors, set and update user.

SDK Version

6.13.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```

Exception in thread "main" com.microsoft.graph.beta.models.odataerrors.ODataError: The context URL 'https://graph.microsoft.com/beta/$metadata#users(sponsors())/$entity' is invalid.
at com.microsoft.graph.beta.models.odataerrors.ODataError.createFromDiscriminatorValue(ODataError.java:36)
at com.microsoft.kiota.serialization.JsonParseNode.getObjectValue(JsonParseNode.java:212)
at com.microsoft.kiota.http.OkHttpRequestAdapter.lambda$throwIfFailedResponse$0(OkHttpRequestAdapter.java:674)
at com.microsoft.kiota.ApiExceptionBuilder.(ApiExceptionBuilder.java:26)
at com.microsoft.kiota.http.OkHttpRequestAdapter.throwIfFailedResponse(OkHttpRequestAdapter.java:673)
at com.microsoft.kiota.http.OkHttpRequestAdapter.send(OkHttpRequestAdapter.java:281)
at com.microsoft.graph.beta.users.item.UserItemRequestBuilder.patch(UserItemRequestBuilder.java:1138)
at com.microsoft.graph.beta.users.item.UserItemRequestBuilder.patch(UserItemRequestBuilder.java:1122)
at xxx.MSEntraService.updateUser(MSEntraService.java:86)
at xxx.Main.main(Main.java:147)

</details>


### Configuration

Windows 11 x64

### Other information

Any interaction with sponsors throw an error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions