René's URL Explorer Experiment


Title: `InvalidModel` when updating Access Package Assignment Policy · Issue #1258 · microsoftgraph/msgraph-sdk-python · GitHub

Open Graph Title: `InvalidModel` when updating Access Package Assignment Policy · Issue #1258 · microsoftgraph/msgraph-sdk-python

X Title: `InvalidModel` when updating Access Package Assignment Policy · Issue #1258 · microsoftgraph/msgraph-sdk-python

Description: Describe the bug I want to update an access package assignment policy, but whenever the policy includes the requirement for approval (i.e. is_approval_required_for_add=True), this fails with an InvalidModel error. Example: If I set the p...

Open Graph Description: Describe the bug I want to update an access package assignment policy, but whenever the policy includes the requirement for approval (i.e. is_approval_required_for_add=True), this fails with an Inv...

X Description: Describe the bug I want to update an access package assignment policy, but whenever the policy includes the requirement for approval (i.e. is_approval_required_for_add=True), this fails with an Inv...

Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-python/issues/1258

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`InvalidModel` when updating Access Package Assignment Policy","articleBody":"### Describe the bug\n\nI want to update an access package assignment policy, but whenever the policy includes the requirement for approval (i.e. `is_approval_required_for_add=True`), this fails with an `InvalidModel` error. \n\n**Example**:\nIf I set the property for \"requires approval\" to false, I am able to retrieve an existing access package policy by ID and update a certain property (e.g. the duration) successfully: \n\n```\n\n# Retrieve the pre-existing access package assignment policy:\nap_assignment_policy_obj = await graph_client.identity_governance.entitlement_management.assignment_policies.by_access_package_assignment_policy_id(\u003cap_pol_id\u003e).get()\n\n# Set the required duration in ISO 8601 duration format:\nap_assignment_policy_obj.expiration.duration = \"PT4H\"\n        \n# Update the access package assignment policy:\nresult = await graph_client.identity_governance.entitlement_management.assignment_policies.by_access_package_assignment_policy_id(\u003cap_pol_id\u003e).put(ap_assignment_policy_obj)\n\n```\n\nHowever as soon as \"requires approval\" is set to true (and the associated approval groups etc. are set), I am no longer able to update an existing access package assignment policy. Instead, the following error is encountered:\n\n```\nmsgraph.generated.models.o_data_errors.o_data_error.ODataError: \nAPIError\nCode: 400\nmessage: None\nerror: MainError(additional_data={}, code='InvalidModel', details=[], inner_error=InnerError(additional_data={}, client_request_id='', date=datetime.datetime(2025, 6, 12, 12, 57, 48), odata_type=None, request_id=''), message='The model is invalid.', target=None)\n```\n\n\n### Expected behavior\n\nRegardless of whether or not approval is required (as dictated by the property `is_approval_required_for_add`), the access package policy update should work.\n\n### How to reproduce\n\n1. Create an access package assignment policy\n2. Set \"requires approval\" to true, and fill in the required properties\n3. Try to update the access package assignment policy\n\n### SDK Version\n\n1.33.0\n\n### Latest version known to work for scenario above?\n\n_No response_\n\n### Known Workarounds\n\n_No response_\n\n### Debug output\n\n\u003cdetails\u003e\u003csummary\u003eClick to expand log\u003c/summary\u003e\n\n```\n\nmsgraph.generated.models.o_data_errors.o_data_error.ODataError: \nAPIError\nCode: 400\nmessage: None\nerror: MainError(additional_data={}, code='InvalidModel', details=[], inner_error=InnerError(additional_data={}, client_request_id='', date=datetime.datetime(2025, 6, 12, 12, 57, 48), odata_type=None, request_id=''), message='The model is invalid.', target=None)\n\n```\n\u003c/details\u003e\n\n\n### Configuration\n\n_No response_\n\n### Other information\n\nAn example of the approval settings that can be used to generate this error is shown below:\n\n``` \n\nfrom msgraph.generated.models.access_package_assignment_approval_settings import AccessPackageAssignmentApprovalSettings\nfrom msgraph.generated.models.access_package_approval_stage import AccessPackageApprovalStage\n\nap_assignment_policy_obj. request_approval_settings = AccessPackageAssignmentApprovalSettings(\n        is_approval_required_for_add = True,\n        is_approval_required_for_update = False,\n        is_requestor_justification_required = True,\n        stages = [\n                AccessPackageApprovalStage(\n                    duration_before_automatic_denial = datetime.timedelta(days=14), \n                    is_escalation_enabled = False,\n                    is_approver_justification_required = True,\n                    duration_before_escalation = datetime.timedelta(0),\n                    primary_approvers = [\n                        GroupMembers(\n                            odata_type = \"#microsoft.graph.groupMembers\",\n                            description = \"approver_group\"\n                        )\n                    ],\n                    fallback_primary_approvers = [],\n                    escalation_approvers = [],\n                    fallback_escalation_approvers = []\n                )\n        ]\n)\n```","author":{"url":"https://github.com/sandra-bee","@type":"Person","name":"sandra-bee"},"datePublished":"2025-06-12T13:19:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1258/msgraph-sdk-python/issues/1258"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fe34c1ac-316c-bc05-466a-1f5ce12dbe63
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD2CE:2D7E6:ECC76F:1442BE1:69693E70
html-safe-nonceb72b2154f9bff311b18d7366158bc2986f6e29d386c868afb634d75941a4ca60
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkNFOjJEN0U2OkVDQzc2RjoxNDQyQkUxOjY5NjkzRTcwIiwidmlzaXRvcl9pZCI6Ijc4MTE1NTQzMzc4MTk4MDMyNDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccae1fae9d972f359a49e467a5ca5c17de3e76f9ba1491dfd0c277067e08190d0
hovercard-subject-tagissue:3140266225
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-python/1258/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b5324fba75510f8fb8f029bd73996940fbf7251b19ed972fa668ddd958fae940/microsoftgraph/msgraph-sdk-python/issues/1258
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b5324fba75510f8fb8f029bd73996940fbf7251b19ed972fa668ddd958fae940/microsoftgraph/msgraph-sdk-python/issues/1258
og:image:altDescribe the bug I want to update an access package assignment policy, but whenever the policy includes the requirement for approval (i.e. is_approval_required_for_add=True), this fails with an Inv...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesandra-bee
hostnamegithub.com
expected-hostnamegithub.com
None54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d
turbo-cache-controlno-preview
go-importgithub.com/microsoftgraph/msgraph-sdk-python git https://github.com/microsoftgraph/msgraph-sdk-python.git
octolytics-dimension-user_id17304259
octolytics-dimension-user_loginmicrosoftgraph
octolytics-dimension-repository_id534665999
octolytics-dimension-repository_nwomicrosoftgraph/msgraph-sdk-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id534665999
octolytics-dimension-repository_network_root_nwomicrosoftgraph/msgraph-sdk-python
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
released69ac0477df0f87da03b8b06cebd187012d7a930
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoftgraph/msgraph-sdk-python/issues/1258#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-python%2Fissues%2F1258
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-python%2Fissues%2F1258
Sign up https://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-python
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-python/issues/1258
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-python/issues/1258
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-python/issues/1258
microsoftgraph https://github.com/microsoftgraph
msgraph-sdk-pythonhttps://github.com/microsoftgraph/msgraph-sdk-python
Notifications https://github.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python
Fork 84 https://github.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python
Star 561 https://github.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python
Code https://github.com/microsoftgraph/msgraph-sdk-python
Issues 89 https://github.com/microsoftgraph/msgraph-sdk-python/issues
Pull requests 17 https://github.com/microsoftgraph/msgraph-sdk-python/pulls
Discussions https://github.com/microsoftgraph/msgraph-sdk-python/discussions
Actions https://github.com/microsoftgraph/msgraph-sdk-python/actions
Projects 0 https://github.com/microsoftgraph/msgraph-sdk-python/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/microsoftgraph/msgraph-sdk-python/security
Please reload this pagehttps://github.com/microsoftgraph/msgraph-sdk-python/issues/1258
Insights https://github.com/microsoftgraph/msgraph-sdk-python/pulse
Code https://github.com/microsoftgraph/msgraph-sdk-python
Issues https://github.com/microsoftgraph/msgraph-sdk-python/issues
Pull requests https://github.com/microsoftgraph/msgraph-sdk-python/pulls
Discussions https://github.com/microsoftgraph/msgraph-sdk-python/discussions
Actions https://github.com/microsoftgraph/msgraph-sdk-python/actions
Projects https://github.com/microsoftgraph/msgraph-sdk-python/projects
Security https://github.com/microsoftgraph/msgraph-sdk-python/security
Insights https://github.com/microsoftgraph/msgraph-sdk-python/pulse
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-python/issues/1258
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-python/issues/1258
InvalidModel when updating Access Package Assignment Policyhttps://github.com/microsoftgraph/msgraph-sdk-python/issues/1258#top
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-python/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-python/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com/sandra-bee
https://github.com/sandra-bee
sandra-beehttps://github.com/sandra-bee
on Jun 12, 2025https://github.com/microsoftgraph/msgraph-sdk-python/issues/1258#issue-3140266225
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-python/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-python/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.