Import User Group Assignments as CSV
Imports EPM group assignments of users from a comma separated value (CSV) file to create new assignments in an existing EPM group. Oracle Fusion Cloud EPM enforces application-level and artifact-level security assignments based on the new group assignments.
Note:
- All user logins and group names included in the import file must exist in Access Control.
- You cannot create a group using this import process.
- You can only create new group assignments; you cannot remove user’s current group assignments.
The CSV file format can be as shown in the following examples:
Example 1
"User Login","Group"
"jdoe","Example_grp1"
"jane.doe@example.com","Example_grp2"
Example 2
"User Login","First Name","Last Name","Email","Direct","Group"
"jdoe","John","Doe","jdoe@example.com","Yes","Example_grp1"
"jane.doe@example.com","Jane","Doe","janedoe@example.com","No","Example_grp2"
This format is identical to the export CSV version of User Group Report (v1). If you use this format, the import process ignores all columns other than User Login and Group. An easy way to create an import file is to export the current User Group report and then modify it as needed.
The API is synchronous and returns the outcome of the operation in the response. Any non-zero status indicates that Updating Groups failed. With this API, you can see which records failed and the reason why they failed, in addition to how many records passed and failed.
This API is version v1.
Required Roles
Service Administrator
Any predefined role and the Access Control - Manage application role
REST Resource
POST /interop/rest/security/v1/import/usergroupassignments
Note:
Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs. Using this REST API requires prerequisites. See Prerequisites.
Request
Supported Media Types: application/octet-stream
Response
Supported Media Types: application/json
Table 12-52 Response Parameters
Name | Description |
---|---|
links |
Detailed information about the link and HTTP call type |
status |
Identifies the status of the operation
|
error |
Detailed information about the error |
details |
Detailed status of the operation performed. Total number of records processed, succeeded, and failed, and the reason for why they failed. |
Examples of Response Body
The following examples show the contents of the response body in JSON format:
Example 1: REST API Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/import/usergroupassignments",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 2,
"succeeded": 2,
"failed": 0,
"faileditems": null
}
}
Example 2: REST API Completes with Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/import/usergroupassignments",
"action": "POST"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21387",
"errormessage": "Failed to import user group report. Authorization failed. User ’bishalghosh’ is not authorized to perform this operation.
"
},
"details": null
}
Example 3: REST API Completes with Partial Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/import/usergroupassignments",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 3,
"succeeded": 1,
"failed": 2,
"faileditems": [
{
"groupname": "GroupA",
"errorcode": "EPMCSS-21382",
"errormessage": "Failed to import user group report.
Invalid group. Provide valid group."
},
{
"groupname": "GroupB",
"errorcode": "EPMCSS-21385",
"errormessage": "Failed to import user group report. Unable to import user members. Provide valid members."
"erroritems": {
"users": [
{
"userlogin": "UserA",
"errorcode": "EPMCSS-21389",
"errormessage": "Invalid user. Provide valid user."
}
]
}
}
],
"items": null
}
Sample cURL Command Basic Auth
curl -X POST 'https://<BASE-URL>/interop/rest/security/v1/import/usergroupassignments' -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/octet-stream' --data-binary '@<FILE_LOCATION>'
curl -X POST 'https://<BASE-URL>/interop/rest/security/v1/import/usergroupassignments' -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/octet-stream' -H 'LOCALE: <LOCALE>' --data-binary '@<FILE_LOCATION>'
Sample cURL Command OAuth 2.0
curl -X POST 'https://<BASE-URL>/interop/rest/security/v1/import/usergroupassignments' -H 'Content-Type: application/octet-stream' -H "Authorization: Bearer <OAUTH_TOKEN>" --data-binary '@<FILE_LOCATION>'
curl -X POST 'https://<BASE-URL>/interop/rest/security/v1/import/usergroupassignments' -H 'Content-Type: application/octet-stream' -H "Authorization: Bearer <OAUTH_TOKEN>" -H 'LOCALE: <LOCALE>' --data-binary '@<FILE_LOCATION>'