Skip to content

Graph API Audit Log Output #3220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marbaugh opened this issue Mar 13, 2025 · 3 comments
Closed

Graph API Audit Log Output #3220

marbaugh opened this issue Mar 13, 2025 · 3 comments
Labels
no-recent-activity Question: SDK status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close

Comments

@marbaugh
Copy link

Describe the bug

In running the Invoke-MgGraphRequest that returns what is said to be a .json file.

I am attempting to load that json file into Powershell and get the following error.

$jsonContent = Get-Content -Path .\test.json -raw
$jsonContent | ConvertFrom-Json

ConvertFrom-Json: Conversion from JSON failed with error: Additional text encountered after finished reading JSON content: [. Path '', line 15161, position 0...

I believe the json file is some type of array but it is not formatted properly.

When will this be updated/resolved so the output can be used properly?

Expected behavior

The output should be a properly formatted JSON file.

How to reproduce

Invoke-MgGraphRequest with the output being json

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_
@marbaugh marbaugh added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Mar 13, 2025
@timayabi2020
Copy link
Contributor

@marbaugh please try specifying the -OutputType parameter as Json and store it in a file. See below.
$json = Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/v1.0/auditLogs/signIns" -Method GET -OutputType Json
$json > Audit.json

Image

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Mar 20, 2025
@marbaugh
Copy link
Author

ok thank you, I am testing this today and will post my results.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Mar 26, 2025
@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 labels Apr 8, 2025
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-recent-activity Question: SDK status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close
Projects
None yet
Development

No branches or pull requests

2 participants