Unable to insert record in PersonWantsOrg table via. a custom script

Hi All,

Our Dell one identity current version is 7.1.3.

I have a sync process that pulls data from anther database to one identity database. During this it inserts a records in PersonWantsOrg table. unfortunately, it is failing to insert a record and showing the following message.

Error - User not authorized to insert the record at this point.

Code where my error occurs is :

' Insert into PersonWantsOrg and Get the UID

Dim dbPWO As ISingleDbObject = Connection.CreateSingle("PersonWantsOrg")

dbPWO.Custom.CallMethod("FillOrder",pBag)

uidPersonWantsOrg = dbPWO.GetValue("UID_PersonWantsOrg").ToString()

dbPwo.Save ' Create PropertyBag of request

I have checked the trace logs and found the following message in it for the process.

"Processing InsertAllowedCheck with UID_Person='111111111-1111-1111-3434-3468324932', UID_Org='21211-3455-3456-1234-DJG4456FTF', ValidFrom='null' and ValidTo='null' returned False "

This is returning FALSE.

I guess this is where the issue is. But I am not sure what permissions are missing that this is causing the issue.

What is InsertAllowedCheck? Is this stored procedure or function . How to check what validation is it doing.? Where to find it what exactly is it doing?

Could someone help me in troubleshooting this.?

Thanks in Advance.

Regards,
T.Sudhir

Parents
  • Hello,

    I guess the first question is: why are you inserting into PersonWantsOrg at all?

    This table store requests for IT Shop products.  Do these already exist in the database from which you're importing?

    Otherwise, I suggest to exclude this table from the sync altogether.

    Perhaps you could explain your business case and we could suggest another way to do this?

    Trevor

Reply
  • Hello,

    I guess the first question is: why are you inserting into PersonWantsOrg at all?

    This table store requests for IT Shop products.  Do these already exist in the database from which you're importing?

    Otherwise, I suggest to exclude this table from the sync altogether.

    Perhaps you could explain your business case and we could suggest another way to do this?

    Trevor

Children
  • Hello Trevor,

    Firstly, Thanks for your response.

    Secondly, YES the IT Shop products are there in database from where we are importing the data. we have already tested this in our UAT environment and it's working as expected, but not in our production environment. There are many other products that are being imported to PersonWantsOrg table and they are fine in getting processed.  

    I'm bit worried with this error message:

    "Processing InsertAllowedCheck with UID_Person='111111111-1111-1111-3434-3468324932', UID_Org='21211-3455-3456-1234-DJG4456FTF', ValidFrom='null' and ValidTo='null' returned False"

    what checks is actually InsertAllowedCheck  doing? is there any way we can find out what is it doing like is it calling any method or executing any script or sql statements, etc.  So that we can be sure what permissions we are missing ....

    Also, in the trace I see QER_FGIPWOOrderPerson function in the trace, what is it exactly checking and is it got something to do with the InsertAllowedCheck?

    2020-07-21 18:02:47.9270 DEBUG (SqlLog 7bb15c29-b9d5-4d46-a49f-c8c883fb000a) :   (3 ms) - select dbo.QER_FGIPWOOrderPerson('111111111-1111-1111-3434-3468324932', '21211-3455-3456-1234-DJG4456FTF', null, null, null)

    2020-07-21 18:02:47.9270 TRACE (SqlLog 7bb15c29-b9d5-4d46-a49f-c8c883fb000a) :   ClaimConnectionAsync: Releasing lock on connection 1

    2020-07-21 18:02:47.9270 DEBUG (ObjectLog 7bb15c29-b9d5-4d46-a49f-c8c883fb000a) :   Processing InsertAllowedCheck with UID_Person='111111111-1111-1111-3434-3468324932', UID_Org='21211-3455-3456-1234-DJG4456FTF', ValidFrom='null' and ValidTo='null' returned False

    Thanks and Regards,

    T.Sudhir