When we were trying to create a procedure and trying to execute the procedure, it was throwing an error as
The module being executed is not trusted. Either the owner of the database of the module needs to be granted authenticate permission, or the module needs to be digitally signed.
create or Alter procedure GetAGNodes With encryption, EXECUTE AS owner
Though it was granted with execute permission with the user, we need to give the database trustworthy to be enabled. The below script needs to be executed to resolve the issue.
ALTER DATABASE DBNAME SET TRUSTWORTHY ON
Hope this helps, if there are any other related issues and resolutions, please feel free to share as a comment!