Log Streaming Organization Metadata

tl;dr: log stream contains metadata for user objects but not for organization objects

I have a log stream set up to a custom webhook. The functionality is working as expected for users: e.g. I get log entries for logins, modifications, etc. Specifically, for users, if the user’s metadata is changed, I get a log entry with the metadata change in the request body as well as in the response, e.g.:

Trimmed for brevity

{
  "date": "2023-02-22T14:55:59.479Z",
  "type": "sapi",
  "description": "Update a User",
...
  "details": {
    "request": {
      "method": "patch",
      "path": "/api/v2/users/auth0%7C63f4fcXXXX",
      "query": {},
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
      "body": {
        "user_metadata": {
          "test": "just a test",
          "test2": "can you see me?"
        },
        "app_metadata": {}
      },
      "channel": "https://manage.auth0.com/",
...
    "response": {
      "statusCode": 200,
      "body": {
        "created_at": "2023-02-21T17:17:35.683Z",
        "email": "user@mail.com",
        ...
        "email_verified": false,
        "user_metadata": {
          "test": "just a test",
          "test2": "can you see me?"
        }
      }
    }
  }...
}

This is not true for Organization metadata changes. E.g. this is the log event after updating an Organization’s metadata:

{
  "date": "2023-02-22T18:12:29.774Z",
  "type": "sapi",
  "description": "Modify an Organization",
  ...
  "details": {
    "request": {
      "method": "patch",
      "path": "/api/v2/organizations/org_iRZBXXXX",
      "query": {},
      "body": {},
      "channel": "https://manage.auth0.com/",
      "auth": {
        "user": {
          "user_id": "auth0|61731aXXXX",
          "name": "user@mail.com",
          "email": "user@mail.com"
        },
       ...
      }
    },
    "response": {
      "statusCode": 200,
      "body": {
        "id": "org_iRZBXXXX",
        "name": "org-test"
      }
    }
  },
...}

Is this behavior expected, i.e. that user metadata is logged but organization metadata is not? I don’t see anything in the docs highlighting it as excluded.

FYI on my custom log stream I have no filters applied so I can troubleshoot, so it’s not a filtering issue.

image

Also, I’m using the Dashboard → Monitoring → Logs for my troubleshooting to validate that it’s not an issue with the webhook.

Hey there!

That’s a good question. Let me confirm it with the team and get back to you shortly!

So actually got some news back from the team. Generally speaking for orgs we only put the minimum to limit what’s going over the wire.

You can fetch org metadata if necessary using org_id, for example

Thanks for the follow-up. Would definitely be interested in receiving the org metdata via Log Stream in the future if you could pass that feedback along. For now, we’ll fallback to the API.

Sure no problem! I would actually encourage you to actually pass that feedback using our Feedback category here: