on 2020 Sep 23 11:22 AM
Hello Experts,
We are trying to implement a scenario for HANA user provisioning via a pass(to generic) called from a repository job.
The idea is to fetch all userid’s associated to a business role and provision to HANA system as soon as we connect it to IDM.
So, by default all users associated to particular role will already be created as soon as we connect the same to IDM system. To fulfil this we are using uProvision function to trigger provisioning tasks. But, we see uProvision task is failing in Prepare Provisioning step with below error,
Here is the script what we are trying to use inside a pass,
Source,
SELECT DISTINCT[Auto_Priv].[MSKEY]
FROM
[idmv_vallink_ext_active] AS [Rep_Name]
INNER JOIN [idmv_vallink_ext_active] AS [Entry_Type]
ON (
[Rep_Name].[MSKEY]=[Entry_Type].[MSKEY]
AND [Rep_Name].[mcAttrName]='MX_REPOSITORYNAME'
AND [Rep_Name].[mcSearchValue]='$FUNCTION.uGetRepositoryName()$$'
AND [Entry_Type].[mcAttrName]='MX_ENTRYTYPE'
AND [Entry_Type].[mcSearchValue]='MX_PRIVILEGE')
INNER JOIN [idmv_vallink_ext_active] AS [Auto_Priv]
ON (
CAST([Rep_Name].[MSKEY] AS varchar(10))=[Auto_Priv].[mcSearchValue]
AND [Auto_Priv].[mcAttrName]in ('MX_AUTOPRIVILEGE','MXREF_MX_PRIVILEGE'))
Destination,
Next data entry – provisionIMDBUser
MSKEY %mskey%
function rmda_provisionIMDBUser(userEntry) {
var mskey = userEntry.get("MSKEY");
var idStore = "%$pck.SAP_MASTER_IDS_ID%";
var mskeyvalue = UserFunc.uIS_GetValue(mskey, idStore, "MSKEYVALUE");
var repositoryName = UserFunc.uGetRepositoryName();
var repositoryID = UserFunc.uGetRepositoryID();
var AuditID = uGetAuditID();
var provisionTask = uGetConstant("pck.RMDA_MX_PROVISIONTASK");
uWarning("provisionTask: " + provisionTask);
if (provisionTask == null || provisionTask == "") {
UserFunc.uErrMsg(2, "No 'MX_PROVISIONTASK' defined in repository '" + repositoryName + "'. " + "Cannot initially provision privilege assignments of user '" + mskeyvalue + "' to the repository.");
} else {
// Call the IMDB provisioning task.
UserFunc.uSleep(1);
UserFunc.uWarning("Provisioning privilege assignments of MX_PERSON '" + mskeyvalue + "' (" + mskey + ") to repository '" + repositoryName + "'...");
var result = UserFunc.uProvision(mskey, provisionTask, 0, repositoryID, "INITIALLY PROVISIONED MX_PERSON PRIVILEGES", 0);
//uWarning(result);
return;
}
return "";
}
We are calling standard SAP provided “provision” trigger using “var provisionTask = uGetConstant("pck.RMDA_MX_PROVISIONTASK");” in the job.
Please help me to know if I am doing something wrong or suggest me if there is any better approach to carry out this task.
Regards,
Amarnath

Request clarification before answering.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.