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
Deserialization exception when adding group to lifecycle policy in Azure Active Directory #549
Expected behavior. Please provide links to the specific Microsoft Graph documentation you used to determine the expected behavior.
Actual behavior. Provide error codes, stack information, and a Fiddler capture of the request and response (please remove personally identifiable information before posting).
Steps to reproduce the behavior. Include your code, IDE versions, client library versions, and any other information that might be helpful to understand your scenario.
I'm trying to add a group to a lifecycle policy and the call to await Client.GroupLifecyclePolicies[lifecyclePolicyId].AddGroup(groupId).Request().PostAsync(ct); is throwing exception: Newtonsoft.Json.JsonReaderException: 'Unexpected character encountered while parsing value: {. Path '', line 1, position 1.'
Expected behavior
The call should not throw
Actual behavior
The call is throwing
Steps to reproduce the behavior
Create an Office365 group in Azure Active Directory and add it to a lifecycle policy
and then call await Client.GroupLifecyclePolicies[lifecyclePolicyId].AddGroup(groupId).Request().PostAsync(ct);
I'm using Microsoft.Graph 1.17.0 from a .NET Framework 4.6.1 project
Is there any update on this exception?
Still get this exception as of Feb 11, 2020 with Graph SDK 1.21 and .NET Core 2.2.8
For me the call is thrown but group is added to policy.
Activity
BigEaseGueldi commentedon Oct 22, 2019
Can confirm this. Using Graph SDK 1.16.0 and .NET 4.7.1.
MalteJohansson commentedon Feb 11, 2020
Is there any update on this exception?
Still get this exception as of Feb 11, 2020 with Graph SDK 1.21 and .NET Core 2.2.8
For me the call is thrown but group is added to policy.
MIchaelMainer commentedon Feb 11, 2020
I think I know what is going on here. The AddGroup action returns boolean. The deserializer expects an object. It can't handle:
{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Edm.Boolean","value":true}This issue may impact any action that returns a primitive.
MIchaelMainer commentedon Sep 17, 2020
related to microsoftgraph/msgraph-sdk-dotnet-core#134
MIchaelMainer commentedon Oct 6, 2020
Release will occur with the following fixes:
#800
microsoftgraph/msgraph-beta-sdk-dotnet#160