For SQL Azure, permissions are database-scoped and use cloud-based authentication methods (SQL Authentication or Microsoft Entra ID), with access managed through database users and roles.
Run this script to grant permissions to TrustedUser
Run the following SQL script to grant the required permissions to user TrustedUser.
GRANT VIEW DATABASE STATE TO TrustedUser;
Note: Run this statement in the target Azure SQL Database. Azure SQL Database does not support the
USE <database_name> statement to change the database context. Therefore, connect directly to the required database before running the command.