msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

https://graph.microsoft.com/beta/security/auditLog/queries/<Id>/records - Conversion from JSON failed

Open Jbmainson opened this issue 1 year ago • 0 comments

Describe the bug

Can't fetch records found by the audit search : Getting the following error :

Invoke-MgGraphRequest : Conversion from JSON failed with error: After parsing a value an unexpected character was encountered: {. Path 'value[406].administrativeUnits', line 1, position 1027566.
At line:1 char:1
+ Invoke-MgGraphRequest -Uri $Uri
+ CategoryInfo          : InvalidOperation: (:) [Invoke-MgGraphRequest], ArgumentException
+ FullyQualifiedErrorId : NotSpecified,Microsoft.Graph.PowerShell.Authentication.Cmdlets.InvokeMgGraphRequest

Expected behavior

Records should be displayed

How to reproduce

Create new audit logs search and fetch records using :

$Uri = ("https://graph.microsoft.com/beta/security/auditLog/queries/{0}/records?`$Top=999" -f $AuditLogsSearchId) Invoke-MgGraphRequest -Uri $Uri

2024-04-17_14h53_50

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Jbmainson avatar Apr 17 '24 13:04 Jbmainson