Microsoft Security | Microsoft Graph
An API that connects multiple Microsoft services, enabling data access and automation across platforms
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I'm using Java & Graph API
I try to call for https://learn.microsoft.com/en-us/graph/api/channel-doesuserhaveaccess?view=graph-rest-1.0&tabs=http
But the successful response always result null.
I debugged the http stream and I see a successful response
{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Edm.Boolean", "value": true }
I also removed the odata.contex by header but still it result none
Accept: application/json;odata.metadata=none
My Code:
ChannelDoesUserHaveAccessRequest
request = graphClient.teams(teamId)
.channels(channelId)
.doesUserHaveAccess(
ChannelDoesUserHaveAccessParameterSet.newBuilder()
.withUserId(userId)
.build())
.buildRequest()
return request.get()
Notice this request will generate "ChannelDoesUserHaveAccessRequest" which try to convert the result json directly to Boolean!
SDK details:
SdkVersion:graph-java/v5.80.0
SdkVersion:
User-Agent:
Thanks,
Eran
An API that connects multiple Microsoft services, enabling data access and automation across platforms