The users in our EndProduct can create employees for their company within the application. We have a task that creates a relation + an employee record.
In addition to creating an employee we would like to be able to create an IAM user with the information and credentials the user has supplied. So we made a subroutine called ‘create_iam_user’. This subroutine does inserts/updates on the IAM database. After creating an employee record the subroutine will be executed. But when it does, we get the following error in return.
The users in our EndProduct have no rights on the IAM database and the ‘User Admin’ rights are not granted.
I tried altering the procedure to execute it as OWNER or as a SQL login that does have ‘User Admin’ rights.
After changing the procedure the execution (via SSMS) of the procedure succeeded with a SQL login that has no IAM rights.
However when trying to execute the procedure via the EndProduct user we still receive an error.
Why doesn’t the ‘EXECUTE AS’ method work when executing the procedure via the GUI? We started the application via the Win GUI in combination with Indicium.