question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Graph.RBAC] JsonSerializationException on ListMember on AD Group

See original GitHub issue

Hi,

I just upgraded this package from 1.8.0 to 1.11.1 and when running I get this exception on executing ListMembers on a AD Group.

Newtonsoft.Json.JsonSerializationException
  HResult=0x80131500
  Message=Error setting value in extension data for type 'Microsoft.Azure.Management.Graph.RBAC.Fluent.Models.ServicePrincipalInner'. Path 'homepage', line 1, position 996.
  Source=Newtonsoft.Json
  StackTrace:
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetExtensionData(JsonObjectContract contract, JsonProperty member, JsonReader reader, String memberName, Object o)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings settings)
   at Microsoft.Azure.Management.Graph.RBAC.Fluent.ActiveDirectoryGroupImpl.WrapObjectInner(AADObjectInner inner)
   at Microsoft.Azure.Management.Graph.RBAC.Fluent.ActiveDirectoryGroupImpl.<ListMembers>b__22_3(AADObjectInner t)
   at System.Linq.Enumerable.<>c__DisplayClass7_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.String.Join(String separator, IEnumerable`1 values)
   at ConsoleApp2.Program.GetName(IGraphRbacManager manager, String objectId) in C:\Users\RudiLarno\Source\Repos\ConsoleApp2\ConsoleApp2\Program.cs:line 379
   at ConsoleApp2.Program.AuditKeyVaults(IAzure azure, Boolean executeDelete, TraceWriter log) in C:\Users\RudiLarno\Source\Repos\ConsoleApp2\ConsoleApp2\Program.cs:line 331
   at ConsoleApp2.Program.Main(String[] args) in C:\Users\RudiLarno\Source\Repos\ConsoleApp2\ConsoleApp2\Program.cs:line 55

Inner Exception 1:
ArgumentException: An item with the same key has already been added.

Note that when inspecting the AD Group using the Azure Portal UI, there are no duplicate entries as such.

https://github.com/Azure/azure-libraries-for-net/blob/948234d369535b62e3196ae55081e5d82f58efc8/src/ResourceManagement/Graph.RBAC/ActiveDirectoryGroupImpl.cs#L148

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
hovsepmcommented, Jul 16, 2018

Release 1.13 is out. Please upgrade your references.

1reaction
hovsepmcommented, Jul 12, 2018

fix has been merged. Will be shipped as part of release 1.13.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get service principal fails when service ...
When we get the details of a service principal, we get an error An item with the same key has already been added...
Read more >
List group members - Microsoft Graph v1.0
Get a list of the group's direct members. A group can have users, organizational contacts, devices, service principals and other groups as ...
Read more >
Azure Active Directory - graphrbac.GroupsClient#List: ...
Azure AD ; Error listing Azure ; "displayName eq 'AdminRole-Product-DFDevelopmentOps'": graphrbac.GroupsClient ; StatusCode=403 ; Service returned ...
Read more >
Graph API not fetching the AD groups of the users which ...
We are facing problem in fetching the groups from the graph Api in C# for external users(which are part of Azure AD through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found