Closed djuneja-uptycs closed 1 year ago
Found the issue, I was giving incorrect object type when creating iterator. I made the below change:
Initial Code:
pageIterator, err := msgraphcore.NewPageIterator(result, c.adapter, models.CreateDirectoryObjectFromDiscriminatorValue)
Changed Code:
pageIterator, err := msgraphcore.NewPageIterator(result, c.adapter, models.CreateDirectoryObjectCollectionResponseFromDiscriminatorValue)
this did the trick, we need to make sure we are giving the correct object to the iterator. Nevertheless, it shouldn't crash IMO. But thanks!
Description:
We are trying to fetch the members of a give AAD Group but we are getting the following issue but it is crashing in the iteration step. Below is the code which we are using:
We are getting below panic logs:
On further inspection, it seems that the panic is coming from the page iterator itself:
Graph dependencies we are using: