René's URL Explorer Experiment


Title: SDK NullPointerException due to missing @odata.type field during select query · Issue #2587 · microsoftgraph/msgraph-sdk-java · GitHub

Open Graph Title: SDK NullPointerException due to missing @odata.type field during select query · Issue #2587 · microsoftgraph/msgraph-sdk-java

X Title: SDK NullPointerException due to missing @odata.type field during select query · Issue #2587 · microsoftgraph/msgraph-sdk-java

Description: Describe the bug During a select query for users, mapping them to the User class fails with following NPE java.lang.NullPointerException: parameter node cannot be null at java.util.Objects.requireNonNull(Objects.java:246) at io.kiota.ser...

Open Graph Description: Describe the bug During a select query for users, mapping them to the User class fails with following NPE java.lang.NullPointerException: parameter node cannot be null at java.util.Objects.requireN...

X Description: Describe the bug During a select query for users, mapping them to the User class fails with following NPE java.lang.NullPointerException: parameter node cannot be null at java.util.Objects.requireN...

Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SDK NullPointerException due to missing @odata.type field during select query","articleBody":"### Describe the bug\n\nDuring a select query for users, mapping them to the User class fails with following NPE\n\n```\njava.lang.NullPointerException: parameter node cannot be null\n\tat java.util.Objects.requireNonNull(Objects.java:246)\n\tat io.kiota.serialization.json.JsonParseNode.\u003cinit>(JsonParseNode.java:38)\n\tat io.kiota.serialization.json.JsonParseNodeFactory.createJsonParseNode(JsonParseNodeFactory.java:32)\n\tat io.kiota.serialization.json.JsonParseNode.getChildNode(JsonParseNode.java:48)\n\tat com.microsoft.graph.models.User.createFromDiscriminatorValue(User.java:30)\n\tat io.kiota.serialization.json.JsonParseNode.getObjectValue(JsonParseNode.java:248)\n\tat io.kiota.serialization.json.JsonParseNode.getCollectionOfObjectValues(JsonParseNode.java:219)\n\tat com.microsoft.graph.models.UserCollectionResponse.lambda$getFieldDeserializers$0(UserCollectionResponse.java:34)\n\tat io.kiota.serialization.json.JsonParseNode.assignFieldValues(JsonParseNode.java:301)\n\tat io.kiota.serialization.json.JsonParseNode.getObjectValue(JsonParseNode.java:249)\n\tat com.microsoft.kiota.http.OkHttpRequestAdapter.send(OkHttpRequestAdapter.java:322)\n\tat com.microsoft.graph.groups.item.members.graphuser.GraphUserRequestBuilder.get(GraphUserRequestBuilder.java:70)\n```\n\n### Expected behavior\n\nThe user(s) should be selected by the query, mapped and returned in a response object\n\n### How to reproduce\n\nCode snippet to reproduce:\n```\nfinal String groupId = \"test group id\";\nfinal GraphUserRequestBuilder request = client.groups()\n                .byGroupId(groupId)\n                .members()\n                .graphUser()\n                .get(req -> {\n                    req.queryParameters.select = \"id,name,mail\";\n                    req.queryParameters.filter = \"id in (1,2,3)\";\n                    req.queryParameters.count = true;\n                    req.headers.add(\"ConsistencyLevel\", \"eventual\");\n                    }\n                })\n```\nCode snippet to reproduce the NPE with the JsonNode\n```\nimport com.fasterxml.jackson.databind.node.JsonNodeFactory;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\nimport io.kiota.serialization.json.JsonParseNode;\nimport io.kiota.serialization.json.JsonParseNodeFactory;\n\nclass Scratch {\n    static void main() {\n        try {\n            var a = new JsonParseNode(new JsonParseNodeFactory(), new ObjectNode(new JsonNodeFactory(false)));\n            var b = a.getChildNode(\"@odata.type\");\n        } catch (NullPointerException e) {\n            System.out.println(\"Exception!\");\n        }\n    }\n}\n```\nReplicating this code in Graph UI returns following example response:\n\n```\n{\n    \"@odata.context\": \"https://graph.microsoft.com/v1.0/$metadata#users(id,name,mail)\",\n    \"@odata.count\": 2,\n    \"value\": [\n        {\n            \"id\": \"id 1\",\n            \"name\": \"name 1\",\n            \"mail\": \"mail 1\"\n        },\n        {\n            \"id\": \"id 2\",\n            \"name\": \"name 2\",\n            \"mail\": \"mail 2\"\n        }\n    ]\n}\n```\n\nWhich then leads to the NPE as the SDK is expecting @odata.type field being set here\n\nhttps://github.com/microsoftgraph/msgraph-sdk-java/blob/main/src/main/java/com/microsoft/graph/generated/models/User.java\n```\n@jakarta.annotation.Nonnull\n    public static User createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {\n        Objects.requireNonNull(parseNode);\n        final ParseNode mappingValueNode = parseNode.getChildNode(\"@odata.type\"); \u003c- NPE being caused here\n        if (mappingValueNode != null) {\n            final String mappingValue = mappingValueNode.getStringValue();\n            switch (mappingValue) {\n                case \"#microsoft.graph.agentUser\": return new AgentUser();\n            }\n        }\n        return new User();\n    }\n```\n\n### SDK Version\n\n6.63.0\n\n### Latest version known to work for scenario above?\n\n6.62.0\n\n### Known Workarounds\n\n_No response_\n\n### Debug output\n\n\u003cdetails>\u003csummary>Click to expand log\u003c/summary>\n```\n\n\u003cLog output here>\n\n```\n\u003c/details>\n\n\n### Configuration\n\n_No response_\n\n### Other information\n\n_No response_","author":{"url":"https://github.com/KonstantinMeining","@type":"Person","name":"KonstantinMeining"},"datePublished":"2026-05-06T13:51:47Z","url":"https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c9188ebf-5792-6ce2-b674-06a5c0ce900f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC028:15FCEB:905E5:CF76C:6AF6BA99
html-safe-nonceeebcf6d034e33a9316060f9ac585b3cea22a4afc7c5aee827f1859fa32ad4b88
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDI4OjE1RkNFQjo5MDVFNTpDRjc2Qzo2QUY2QkE5OSIsInZpc2l0b3JfaWQiOiIxMTA0OTQyNTA0MDQ3MTk2ODI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb83cb1f3c3cdc194c6f7735ca39f7cee175126a3c1f3fbba8bb6e034ecd0b3a3
hovercard-subject-tagissue:4391888339
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoftgraph/msgraph-sdk-java/2587/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bd195a2d48038b0a21d6c4a834d817891baf05ca5d0f8affff8b6fd87441e976/microsoftgraph/msgraph-sdk-java/issues/2587
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bd195a2d48038b0a21d6c4a834d817891baf05ca5d0f8affff8b6fd87441e976/microsoftgraph/msgraph-sdk-java/issues/2587
og:image:altDescribe the bug During a select query for users, mapping them to the User class fails with following NPE java.lang.NullPointerException: parameter node cannot be null at java.util.Objects.requireN...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameKonstantinMeining
hostnamegithub.com
expected-hostnamegithub.com
None8dfae1499400ee498ab0f86538d1c034e6c1b4f51c63ecade775c3b0894e3379
turbo-cache-controlno-preview
go-importgithub.com/microsoftgraph/msgraph-sdk-java git https://github.com/microsoftgraph/msgraph-sdk-java.git
octolytics-dimension-user_id17304259
octolytics-dimension-user_loginmicrosoftgraph
octolytics-dimension-repository_id103300409
octolytics-dimension-repository_nwomicrosoftgraph/msgraph-sdk-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id103300409
octolytics-dimension-repository_network_root_nwomicrosoftgraph/msgraph-sdk-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseee168845eb2be91203b179104ac9977fe4ea69a3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2587#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-java%2Fissues%2F2587
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-java%2Fissues%2F2587
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoftgraph%2Fmsgraph-sdk-java
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2587
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2587
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2587
microsoftgraphhttps://github.com/microsoftgraph
msgraph-sdk-javahttps://github.com/microsoftgraph/msgraph-sdk-java
Codehttps://github.com/microsoftgraph/msgraph-sdk-java
Issues107 (107)https://github.com/microsoftgraph/msgraph-sdk-java/issues
Pull requests23 (23)https://github.com/microsoftgraph/msgraph-sdk-java/pulls
Actionshttps://github.com/microsoftgraph/msgraph-sdk-java/actions
Projectshttps://github.com/microsoftgraph/msgraph-sdk-java/projects
Security and qualityhttps://github.com/microsoftgraph/msgraph-sdk-java/security
Insightshttps://github.com/microsoftgraph/msgraph-sdk-java/pulse
https://github.com/microsoftgraph/msgraph-sdk-java
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587
SDK NullPointerException due to missing @odata.type field during select queryhttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2587#top
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com/KonstantinMeining
KonstantinMeininghttps://github.com/KonstantinMeining
on May 6, 2026https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587#issue-4391888339
https://github.com/microsoftgraph/msgraph-sdk-java/blob/main/src/main/java/com/microsoft/graph/generated/models/User.javahttps://github.com/microsoftgraph/msgraph-sdk-java/blob/main/src/main/java/com/microsoft/graph/generated/models/User.java
KonstantinMeininghttps://github.com/KonstantinMeining
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
on May 6, 2026https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587#event-25221126974
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2587
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.