SAP lock unlock account Uflag 64

I am having a problem in performing a lock / unlock of a SAP account to which an account definition is assigned, in particular if I try to insert a code uflag 64 (Administrative lock) or 0 (unlock). This also happens with the tool Manager, by selecting a SAP account with account definition, then selecting the lock / unlock button.

I also tried on a SAP account that doesn't have an account definition and it works in that case.

So I would like to ask you if there is a method to lock / unlock without removing the account definition.
I am using One Identity version 8.1.3.
Thanks for your attention
  • Just to get it right, the OOTB lock / unlock method is not working when you are using it on a SAPUser the is connected to a person via an account definition?

    Or is your custom code not working?

  • Yes, it's not working for the entities that are connected to a person via an account definition.

    In particular I verified also that if you revoke the account definition, the SAP account remains linked to the identity (so the account def is removed), and then you can lock and unlock the SAP account.

    Instead if you click on assign account def in the Overview | Task of an employee, then select remove account def, at the end of the processes the identity it's not linked with the SAP account. Are there differences between revoke and remove account definition?