- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 11:00 AM
I created a user using rest api posting to sys_user
I gave username and password
I want to automate the whole process including creating user. I am just testing right now with rest explorer.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 11:06 PM
I have tried this in my PDI and worked really well for me!
Could you please try this, I have used the same body which you mentioned
You are going in the right direction, can you make "sysparm_input_display_value" to true as mentioned in the screenshot.
After creation of user, I was able to login with the user_name and password!
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 11:35 PM
Great! It worked. Thanks, I can see the encrypted password in the response. and I could login locally.
Can I do the same to assign admin and user roles to this user using sys_user_has_role table and
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 11:36 PM
You marked my answer as helpful!
Please accept the solution if it has worked for you, it would be beneficial for future readers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 12:29 AM
I marked Accept as solution.
I had another question about assigning admin and user roles to this user using sys_user_has_role table.
I am using
This works, But I need to add more roles like admin_activity , user etc.
Could you shed light on how I can assign multiple roles admin_activity , user ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 12:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 03:03 AM
I have checked the API and it seems that we can add a single role at a time using the Rest API
I would suggest create a custom role in the instance and add all the required roles which you want to add in that and by making rest API call you can assign custom role to the user, it will reflect all the roles to the user automatically!
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.