You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Graph client's batch request builder POST/PATCH request not working #833
I am trying to create multiple sharepoint list items in a list usign the batch request builder. Bu t throws API 400 error. Below is my implementation in the How to reproduce section
Expected behavior
I expect it to create all the records as it uses the jsonwriter and the method write_object which the actual ListItem also uses
i also want to add that, when returning the batchRequestBuilder it uses the msgraph_core where the url_template is formatted wrong as it adds an additional / based on this line which would result in https://graph.microsoft.com/v1.0//$batch
Vincent Biret (@baywet) this thing was fixed when i manually overide the content of the batchrequest information as follows after this line in msgraph_core/batch_request_builder.
My take would be the serialization of the batchRequestItem needs to be handled
i also want to add that, when returning the batchRequestBuilder it uses the msgraph_core where the url_template is formatted wrong as it adds an additional / based on this line which would result in https://graph.microsoft.com/v1.0//$batch
Would you mind sending a pull request to check whether the base url ends with a / before adding one please?
@baywet this thing was fixed when i manually overide the content of the batchrequest information as follows after this line in msgraph_core/batch_request_builder.
My take would be the serialization of the batchRequestItem needs to be handled
Activity
chandra447 commentedon Feb 18, 2025
Vincent Biret (@baywet) i have created this issue to continue the conversation
microsoftgraph/msgraph-sdk-python#915 (comment)
chandra447 commentedon Feb 18, 2025
i also want to add that, when returning the batchRequestBuilder it uses the msgraph_core where the url_template is formatted wrong as it adds an additional
/based on this line which would result inhttps://graph.microsoft.com/v1.0//$batchmsgraph-sdk-python-core/src/msgraph_core/requests/batch_request_builder.py
Line 34 in c6c089e
chandra447 commentedon Feb 19, 2025
Vincent Biret (@baywet) this thing was fixed when i manually overide the content of the batchrequest information as follows after this line in msgraph_core/batch_request_builder.
My take would be the serialization of the batchRequestItem needs to be handled
baywet commentedon Feb 19, 2025
Hi Chandra Doredla (@chandra447)
Thank you for using the SDK and for reaching out.
Would you mind sending a pull request to check whether the base url ends with a / before adding one please?
Can you please share the payload you're currently getting for context?
chandra447 commentedon Feb 19, 2025
Hi Vincent Biret (@baywet) ,
this is the actual payload of the
POSTmethod of batch_request_builder, which doesn't add the payload and the headersbaywet commentedon Feb 19, 2025
Thank you for the additional information.
Tracing what should happen:
Can you please:
9 remaining items
baywet commentedon Feb 19, 2025
Thanks for the additional information.
This method is meant to be private to that class I don't think it's a good idea to take a dependency on it.
Do you think we have alternatives here?
chandra447 commentedon Feb 19, 2025
that method just needs a small change but not a major one
at line
needs to be changed to
baywet commentedon Feb 20, 2025
FYI we've migrated all the kiota dependencies in python to https://github.com/microsoft/kiota-python to ease up the coordination between packages when making changes.
miyoyo commentedon May 5, 2025
Posting values in a batch is still broken, please keep this open.