How to use the Admin API within functions

Hello,

I’m curious how to use the admin api from within an atlas function. For example:

  1. document gets updated
  2. trigger calls a function on update
  3. detect changes according the ChangeEvent and if it fits a specific patterns, a specific user should be deleted

At the moment from my point of view, to make this possible it’s required to first of all make a request to get a valid accessToken and then make a request to delete the user.

I’m wondering if it’s possible to directly call that api, because indeed the request would be originated to an internal function of that project. So do I have to first of all request an accessToken every single time the function gets executed?