Resource not found for the segment 'auditLog' while running the security auditlog query

Naveen Kishore Potthuru 20 Reputation points
2025-03-12T15:51:27.8666667+00:00

Hello team,

I've setup a M365 Dev subscription to test the audit log API for purview. When I run the https://graph.microsoft.com/v1.0/security/auditLog/queries using Postman, I get the following error.

When I use the beta version, I get a valid response.

How to address this please.

With Beta

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#security/auditLog/queries",
    "@odata.count": 0,
    "value": []
}

With 1.0

{
    "error": {
        "code": "BadRequest",
        "message": "Resource not found for the segment 'auditLog'.",
        "innerError": {
            "date": "2025-03-12T15:47:27",
            "request-id": "d0382dc2-360b-43ee-95af-1e076967286b",
            "client-request-id": "d0382dc2-360b-43ee-95af-1e076967286b"
        }
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,257 questions
0 comments No comments
{count} votes

Accepted answer
  1. Rajat Vashistha-MSFT 1,155 Reputation points Microsoft External Staff
    2025-03-12T17:45:07.3366667+00:00

    Hi Naveen Kishore Potthuru,

    Thanks for reaching out to Microsoft!

    The document corresponding to the endpoint (Audit Log query) is still in the rollout phase. For now, you can use the beta version. However, please note that APIs under the /beta version in Microsoft Graph are subject to change. The use of these APIs in production applications is not supported.

    Create auditLogQuery

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vasil Michev 115.3K Reputation points MVP
    2025-03-12T17:21:12.0733333+00:00

    I believe it's just a case of the documentation being ahead of the actual GA rollout, use /beta for now.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.