Actions user identities interface / data shape: user_id or userId?

I’m reading the official documentation about actions here.

Under event.user.identities I’m very surprised to see userId instead of user_id.

Is this a documentation bug - or is Auth0 changing from user_id ==> userId?

Thanks.

Update
Just did a test and logged the following:

console.log(Object.keys(event.user.identities[0]).join(','));

And in the logs I get userId:
Screen Shot 2021-04-07 at 22.42.20

But is this not a “bug”? Because when looking at raw JSON for users in Auth0 I get data shaped like this:

I’m actually very surprised that my first action worked at all now?

@konrad.sopala I know you are busy, but can you help get some answers on this one? It confuses me so much :thinking:

Hmm that’s weird. Let me research that and get back to you shortly!

1 Like

Just got the response that we’re in the middle of overhauling each action right now getting it ready for general availability. As part of that effort, we’re standardizing all of the data on the event object to match its Management API counterparts so we’ll be changing userId to user_id in v2 of all these triggers and trying to make sure we’re consistent across all the triggers in each field’s name.

1 Like

That’s really good news - I was like whaaaat is going on. Thanks for clearing that out :+1: Any ETA for v2 then?

Nothing public as of now yet. Will let you know once it’s there!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.