microsoftgraph / msgraph-sdk-powershell

Powershell SDK for Microsoft Graph
https://www.powershellgallery.com/packages/Microsoft.Graph
Other
715 stars 172 forks source link

GraphClient.DirectoryObjects.GetByIds throws JsonReaderError #3036

Open Helenyang2024 opened 5 days ago

Helenyang2024 commented 5 days ago

Describe the bug

When using GraphClient.DirectoryObjects.GetByIds with a principal ID of a custom role, the following JsonReaderError is thrown: '{' is invalid after a value. Expected either ',', '}', or ']'. LineNumber: 0 | BytePositionInLine: 67041.

Expected behavior

Returns DirectoryObject for the existing list of ids

How to reproduce

var result = await this.GraphClient.DirectoryObjects.GetByIds.PostAsGetByIdsPostResponseAsync( new Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostRequestBody { Ids = principalIds, });

where principalIds include a guid id of a custom role assignment

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ``` ```

Configuration

No response

Other information

No response