Create/Update User and assign roles in oracle Fusion using the REST Web Services Part 2

Create Update User and assign roles in oracle Fusion using the REST Web Services Part 2


In Continuation of the part1 the below two points will be covered in this post.

3) PATCH method to update and assign the Roles to the user

4) PATCH method to update the user information

 3) PATCH Operation for Assigning the Roles to the User

REST Web Services

/hcmCoreSetupApi/scim/Roles/{id}

{id} is the ROLE_GUID


Get the Role GUID using the below Query

select * from per_roles_dn_vl where role_name = 'Application Implementation Consultant'


ROLE_GUID: E3A40F5AB08290D7E040F00AC6466664

Get the User GUID using the below Query

select * from per_users where username = 'ABDUL.KALAM'


USER_GUID:  AFF234DC29119F6FE050DD0AFA573C12

“Value” for Payload will be the USER_GUID

https://<host>:<port>/hcmCoreSetupApi/scim/Roles/E3A40F5AB08290D7E040F00AC6466664

Payload:


{
"members": [
{
"value""AFF234DC29119F6FE050DD0AFA573C12",
"operation""ADD"
}
]
}


Postman Tool

Provide Basic Auth


Content-Type              application/json


Payload:

 
{
"members": [
{
"value""AFF234DC29119F6FE050DD0AFA573C12",
"operation""ADD"
}
]
}

Load the above mention Assignment of Role to the user Payload in the Body section of Postman Tool and Execute the webservice using the Send button.



Status shows 204 No Content

Which means it as successfully loaded and assigned the Roles to the User

Verify if the Roles have been assigned to the user.

Tools à Security Console





4) PATCH Operations for Updating the user Information

REST Web Services

/hcmRestApi/scim/Users/{id}

select * from per_users where username = 'ABDUL.KALAM'


https://<host>:<port>/hcmRestApi/scim/Users/AFF234DC29119F6FE050DD0AFA573C12

USER_GUID:  AFF234DC29119F6FE050DD0AFA573C12

Update user information like password, email

Before updating the Email lets check the user


Postman Tool


Provide Basic Auth


Content-Type              application/json

Payload


   {"schemas"  : ["urn:scim:schemas:core:2.0:User",
               "urn:scim:schemas:extension:fa:2.0:faUser"],
               "password"    : "welcome123",
"emails": [
{
"value""kamal.abdul@oracle.com",
"type""W",
"primary"true
}
]
 }


Load the above mention update user Payload in the Body section of Postman Tool and Execute the webservice using the Send button.



Verify the User Information Using below navigation and check if the Email address has been updated.

Tools Ã  Security Console



Please provide your comments and questions and follow below youtube for more information about this post.

Comments

Popular posts from this blog

Run BI Report Web Service Multiple Parameter date format Oracle Fusion BI Report xmlpserver/services/v2/ReportService WSDL

Programmatically Create/Update User and assign roles in oracle Fusion using the REST Web Services Part 1

Oracle Fusion Multiple attachment for an Employee for a Single Document type HDL - HCM Data Loader