I want to allocate a specific admin role to a user based on how they answered a custom field question on an enrollment key.
My use case is: I have users self-creating accounts using enrollment keys. In that enrollment key, they are required to pick an option in a drop-down custom field (it's their job role, but created as a drop down to ensure consistency in answers). If the user chooses a specific answer in that drop down custom field, I want them to be granted a specific admin role that grants them specific admin permissions over their department and all of its sub-departments.
How can I automate this in a way that I do not need to manually assign a role to these users after they create their accounts via the enrollment key?
If this is not a possibility, is there any way to automate the provisioning of an admin role based on a custom field?