-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid key: UserExtend for enum AccessPackageRequestType #838
Comments
Hello @MultimedYam Thanks for using the SDK and for raising this. Running the query against the graph gives me a In your case you say it throws an error in Enum serialization, Any snippets, content of your setup for the identity governence entitlement? I ran: async def get_user_access_package():
try:
access_package_requests = await user_client.identity_governance.entitlement_management.assignment_requests.get(
)
print(f"Access Package Requests: {access_package_requests.value}")
except APIError as api_error:
print(f"api error {api_error}") |
Thanks for looking into this @shemogumbe My snippet of code I use to get the assignment requests expands on some supported fields:
and results in
I double checked the values returned by running the same msgraph call in Postman: In most cases, this exception is not thrown and I receive the expected I hope this provides more insight. |
Noted, async def getAllAccessPackageRequests():
query_params = AssignmentRequestsRequestBuilder.AssignmentRequestsRequestBuilderGetQueryParameters(
expand=[
'accessPackage($select=id,displayName)',
'assignment($expand=target($select=id,displayname,email))',
'requestor'
])
request_config = AssignmentRequestsRequestBuilder.AssignmentRequestsRequestBuilderGetRequestConfiguration(
query_parameters=query_params)
access_package_requests = await user_client.identity_governance.entitlement_management.assignment_requests.get(
request_config)
print(f"Access Package Requests: {access_package_requests.value}")
asyncio.run(getAllAccessPackageRequests()) gives me
|
Hello @MultimedYam upon investigation, this is an issue on the metadata used to generate the SDK, I have documented and raised this tickt microsoftgraph/msgraph-metadata#661 that once fixed will automatically fix this, Following up with @irvinesunday @petrhollayms for quick resolution |
Describe the bug
If my program is attempting to get all access package assignment requests, and comes across a request that has Request Type "UserExtend" it will throw and exception with the error stated in the title.
This type has been documented as a supported type in AccessPackageAssignmentRequest, but is not implemented in the AccessPackageRequestType.
Expected behavior
When making the call to retrieve all access package requests, it should return all requests - of all types, and not throw an exception.
How to reproduce
Requirement: Have an access package request of type "UserExtend" and an initialized GraphServiceClient.
then execute the code:
access_package_requests= await graph_client.identity_governance.entitlement_management.assignment_requests.get()
SDK Version
1.5.3
Latest version known to work for scenario above?
No response
Known Workarounds
None. Enum type is not implemented.
Debug output
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: