How to get the Shopify User performing an Order Action?

We’re building an order action that will perform a handful of updates to the order (updating the shipping address, updating a couple metafields, and adding a note) but when doing so, it only lists our app name in the order timeline as performing the change.

Is there a way to get the logged in Shopify Admin User that triggered the order action so that it can be referenced in a log?

Hey Theo,

Just so I’m understanding - you want the logged in admin user that triggered the order action to be referenced in the order timeline, instead of your apps name?

Yes, ideally it would say something like “[User name] performed [Order Action Name]”. Maybe with the option to add some additional information or details about what is being done.

But since that isn’t existing functionality (and I don’t know the timeline on getting that functionality), is there an alternate way to get the logged in admin user today?

Hi again Theo,

From digging into this - it looks like there’s no direct way to query all logged-in staff members using the API. The staffMember query only retrieves the currently authenticated user based on the access token used for the request, and the staffMembers query provides a list of all staff members but doesn’t include a field to indicate login status.

If you need to track logged-in users, you might need to implement a custom solution, such as logging authentication events or tracking API usage tied to specific staff members.