Skip to content
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

Creating a Team always returns an empty Team : Cannot get the ID of the created Team. #2238

Open
ptrussart opened this issue Nov 28, 2024 · 3 comments
Labels
status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question

Comments

@ptrussart
Copy link

ptrussart commented Nov 28, 2024

Describe the bug

Hello,

I'm using com.microsoft.graph:microsoft-graph:6.21.0 right now.

I'm trying to create a new team and then to get the ID, and the Operation ID of the result.

Team result = getGraphClient().teams().post(team);

The returned Team is always null as the JSON returned by the API is always empty. It seems that those informations are returned in the response header but I cannot access to it as the response is just a Team object.
In v5, it was returned in the object.

How am I supposed to retrieve the ID and the Operation ID of a newly created Team ?

Expected behavior

I expected that the returned Team object will contain the ID and the Operation as it was the case in the v5 of this library.

How to reproduce

Create a team with the code :

Team result = getGraphClient().teams().post(team);

The result will always be a null object.

SDK Version

6.21.0

Latest version known to work for scenario above?

5.x

Known Workarounds

None

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@ptrussart ptrussart added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 28, 2024
@ptrussart ptrussart changed the title Creating a Team always returns an empty Team : I cannot get the ID of the created Team. Creating a Team always returns an empty Team : Cannot get the ID of the created Team. Nov 29, 2024
@ptrussart
Copy link
Author

Hello,

I don't know if this is a bug or if I am supposed to do differently.
Please can anyone help me ?

Regards

@ptrussart
Copy link
Author

Hello,

Is there anyone on this github to help us ?
This has been 3 weeks since I have posted my original message.

What are we supposed to do ? Stop using the Java SDK and call directly the REST API ?

Regards

@Ndiritu
Copy link
Contributor

Ndiritu commented Dec 17, 2024

Hi @ptrussart. My sincere apologies for the delayed response.

v6.x of this SDK tries to align better with expected API response payload. Creating a team is expected to return a 202 with no response body - reference docs

To inspect the response headers, you can override the default response handler to get an OkHttp Response object whose headers you can read. See the sample here

Please let me know if this helps.

@Ndiritu Ndiritu added type:question An issue that's a question status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question
Projects
None yet
Development

No branches or pull requests

2 participants