Technology Blog Posts by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
yashkhanna
Explorer
5,405

Step by Step instruction to Setup / Update IAS User Passwords in Mass using Postman

Background:

As per SAP Note “3001615 - How to mass update user password in Identity Authentication” there are below options to update password of IAS users in mass:

  1. Use SCIM Rest API, Update User Resource option. Provide the "password" attribute during the update, as a result, the password will be changed.
  2. Create a collection of users to mass update more users at the same time. For Postman, following the document: Using the Collection Runner.
  3. In case Identity Provisioning Service (IPS) is integrated, use it to set initial passwords for all users: Passwords Are Stored in Identity Authentication (initial password).

This blog focuses on step-by-step instruction on how to setup passwords in mass through Postman using Collection runner ( option 2).

Section 1 – Setup a system user in IAS:

To be able to update passwords for IAS users using the SCIM API, we need a system user in IAS for authentication in Postman. Follow below steps to create a system user:

  1. Login to the IAS tenant admin console (https://<tenant ID>.accounts.ondemand.com/admin)
  2. Open the “Administrators” tab in “Users & Authorizations” and click on Add. Create a System user by clicking on “System”.

 

yashkhanna_53-1716460060106.png

3. Give the Display name:

yashkhanna_54-1716460060107.png

4. In Configure Authorizations, select Manage Users and Manage Groups:

yashkhanna_55-1716460060110.png

 

5. Click on Save button and next we must set the Secrets for authentication.

yashkhanna_70-1716460171187.png

6. Click on Secrets and then add Secret. Make note of the Client ID and Client secret as this cannot be retrieved from system later. This will be required during authentication in Postman.

yashkhanna_57-1716460060127.png

yashkhanna_71-1716460263950.png

yashkhanna_59-1716460060140.png

Section 2: Setup Postman:

  1. Ensure you have installed POSTMAN and have logged in. It can be downloaded here: https://www.getpostman.com/.
  2. Pick PUT with the following endpoint https://<tenantID>.accounts.ondemand.com/service/scim/Users/{{USERID}}. Here USERID is used as a variable.

yashkhanna_60-1716460060143.png

3. Goto Authorizations. Select Basic Auth. In Username enter Client ID and in Password enter Client Secret you have setup earlier for the system user in IAS:

yashkhanna_61-1716460060153.png

4. In Headers change Content-Type = application/scim+json. Keep all the other entries as is:

yashkhanna_62-1716460060161.png

5. In Body, select RAW and JSON and enter the below code and save the settings:

yashkhanna_63-1716460060168.png

{

    "id": "{{USERID}}",

    "passwordStatus": "enabled",

    "password": "Enter Password of your choice"

}

Password status = enabled will set password as productive for users. If you want to set password as initial use Password status = initial

You can provide password of your choice within quotes.

6. Define USERID as a variable in system. Click on the “USERID” and you will get option of “Set as variable”.

yashkhanna_64-1716460060179.png

Section 3: Updating passwords in mass:

  1. Prepare a list of IAS USER IDs for which you want to reset password in a file with .csv format. Ensure you give header name same as the variable name. In our example its USERID. Here we must use the system generated P IDs of users in IAS. Refer to screenshot below:

yashkhanna_65-1716460060180.png

 

 

yashkhanna_66-1716460060182.png

2. Execute the Script you saved earlier in Runner and give the number of iterations = number of entries you have in your upload file. Upload the load file in Data section and run the collection:

yashkhanna_67-1716460060185.png

3. In run results you should see return code = 200 OK which confirms run was successful and password was setup for the user.

yashkhanna_68-1716460060190.png

4. Password is configured for the users in IAS:

yashkhanna_69-1716460060192.png

 

 

8 Comments
meenakshi_si
Participant
0 Kudos

Hi Yash,

This is really nice blog and very helpful. However , am getting authorizations 401 error...Do you have idea about it?

-  can the passwords be added differently instead of a common password for all users

- To run this process, is there a pre-requisite like any codeto be added in transformation or SCIM API version 2 is required or anything else?

Thanks,

Meenakshi

 

yashkhanna
Explorer
0 Kudos

Hi @meenakshi_si ,

Yes, you can provide different passwords for different users... its just that you have to define password also as a variable, instead a fixed value. And then pass that value through upload file.

To avoid errors... ensure that client id and client secret you have added is correct. Also if you try to assign the same password, for ex. Newuser@12345, by running the script for the same users, it will throw error, as same password cannot be assigned repatedely to the same user. This is by design.

To make this process work, no code or transformation logic changes are required.

Regards,

Yash

meenakshi_si
Participant
0 Kudos

Thanks Yash!

How to add password as variable if you can advise please.

 

yashkhanna
Explorer
0 Kudos
sobbaia
Explorer
0 Kudos

Hello, @yashkhanna, thank you for the guide!
However, I'm getting this error: Successful POST request | AssertionError: expected 503 to be one of [ 200, 201 ]
I think I've set everything up correctly but I'm still getting this error, and in the response body in the console this is what it displays: “No server is available to handle request for this tenant , or the application is temporarily down for maintenance. Excuse us for the inconvenience.”
Could you help me to find out what could be the origin of the error?
Thanks

ritian2023
Discoverer
0 Kudos

We have tried it, and it worked, however could you please let us know the maximum iteration that can be run at a time?

ahrbmartin
Explorer
0 Kudos

As per the Note, the APIs mentioned on line #1# are deprecated:

  • The SCIM Rest API's mentioned above are deprecated with limited availability, these are replaced with the new Identity Directory Service SCIM Rest API's available at the API Business Hub 

    Is there any update to using the new APIs, or any major difference? Or what you have in the blog ARE showing with the new APIs?
AyushiGeorge
Explorer
0 Kudos

I am getting 403 forbidden access error, please help to remove it, thank you!

Labels in this area