How to assign roles to multiple users?

I have a csv file in which there are around 1000 users and I want to assign them roles through Authorization extention. So is there anyway to do it automatically via some sdk? Like for management api and authentication api we have a sdk GitHub - auth0/auth0.net: .NET client for the Auth0 Authentication & Management APIs. but for Authorization extension I couldn’t find any sdk. I could only find this link Authorization Extension API Explorer
So is there anywau to achieve this functionality other than manually add roles for each user.
Thanks

Hello @jah,

I’m fairly certain the only way to do this would be REST calls to the authz API endpoints, per the documentation you linked, specifically:

https://auth0.com/docs/api/authorization-extension#add-user-to-roles

Hi @markd,
Yes, I have done the same. Called authz api endpoint “Add User to Roles” (/users/{user_id/roles). The only issue was role_id. I couldn’t find role_id so I assigned role to one user manually and inspect the http call for role_id and then created a small utility that did the rest.

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?

Link this FAQ to this topic as it talks about how to assign role to multiple users.