What if the `snowflake.connector.errors.ForbiddenError` occurs during a stored procedure execution?

Question

Grade: Education Subject: Support
What if the `snowflake.connector.errors.ForbiddenError` occurs during a stored procedure execution?
Asked by:
99 Viewed 99 Answers

Answer (99)

Best Answer
(520)
When a stored procedure triggers this error, the procedure's definer's rights (EXECUTE MANAGED) and owner's rights (EXECUTE) determine its effective privileges. Grant the `EXECUTE` privilege on the stored procedure to the appropriate role. If the procedure accesses other objects, the definer's rights determines if the procedure uses the privileges of its owner or the current role executing it. This means granting appropriate access to any tables, views or other objects accessed by the stored procedure is necessary.