Hi @ali.sabryali7,
Welcome to the Community!
Yes, in fact, there is a cached Access Token rules can access which you can read about in the docs. However, the scope is limited to read:users
and update:users
:
The Access Token for the Management API, which is available through
auth0.accessToken
, is limited to theread:users
andupdate:users
scopes
Since you need the scope create:organizations
, you would need to create a new machine-to-machine (M2M) application and authorize it to use the Management API with the create:organizations
.
This answer outlines the steps for creating the M2M and writing the rule: Prevent user creation (with hook?) if user is not whitelisted with rule - #5 by stephanie.chamblee
Yes, you would also create a M2M application just like you would for a rule described above.
It sounds like it might be possible, but I will have to do some research to know for sure. I see that you have a ticket for this as well, so I will update here when resolved.