Hi @brett2,
Unfortunately, there isn’t a direct method to assign a user to a role in an Action script.
For this to work, we recommend using the Management API in your Action script. Please follow the steps in our How can I use the Management API in Actions? FAQ on how to add roles to a user on their first log in using Actions.
And yes, calling the Management API will consume your allotted Machine-to-Machine tokens.
I have attached some useful resources below for migrating from Rules to Actions:
Please let us know if you have any additional questions.
Thanks,
Rueben