Forum Discussion

Sunil_GA's avatar
11 years ago

Search user profiles with bulk email addresses and manage roles

Hi,

 

Is there any way where we can Search community for user profiles registered with list of email addresses from a file. If user profile found then change or manage the roles in mass? Any api or any possible way?

 

Thanks,

Sunil_GA

 

 

1 Reply

  • AdamN's avatar
    AdamN
    Khoros Oracle
    11 years ago

    If you have sufficient permissions (i.e. Admin or moderator), you can search for users by e-mail address in the user search. Though if you have a lot of users, that could become pretty tedious.

     

    For a more programattic approach, there is a restapi method to retreive a user by e-mail address:

     

    /restapi/vc/users/email/[email]

    From there, you can obtain the user id and/or login name for each user.

     

    Once you have the user id and/or login name, you have a few different approaches...

    1. You can continue using the REST API to add the roles: 
      /restapi/vc/roles/name/[role_name]/users/add?role.user=/users/id/[user_id]

       

    2. Or, you can use the role import feature in the admin: Community Admin > Users > Import Roles

    I hope this helps!