I would like to run e2e tests against a running API (NestJS) that is protected with Auth0. The frontend app uses Organizations feature. I can generate an access token via /oauth/token and grant_type=client_credentials, but I don’t think that will work as I need to hit API endpoints with particular subs and permissions/roles, unless there is a way to request an access token with specific sub/permissions (seems unlikely). I think I need an id token, but I don’t see how to do that non-interactively without using the Password grant, which is not available to apps that use Organizations.
What would be the easiest way to generate auth tokens to externally test an API as various users/orgs that have already been created for purpose of testing?