Password portal custom script error Object of type Identities does not exist in database or you do not have the relevant viewing permissions. [810029]

Hello,

I am developing a custom script for Password Portal that gets triggered via a custom API call. The goal of the script is to update the property on the Person table for the same user.

The API has the IApiProviderFor<QER.CompositionApi.Password.PasswordPortalApiProject> provided. Yet when the user on the Password portal calls the API we get this error Object of type Identities does not exist in database or you do not have the relevant viewing permissions. [810029].

I have set the permissions for the current user to allow him to call the REST API from the portal. The user also have permission to view and edit all parameters and to run scripts (Program function: Common_StartScripts).

Thank you for your help.