Minimum Permissions Required for SQL Server Logon

You can create an SQL Server authenticated login or user with minimal level of permissions. To create a SQL Server login, you must be connected to the primary database from an admin account through SQL Server Management Studio (SSMS) or SQL Editor.
Note: The read-only access to the master database is required for the user account to monitor the database.
  1. Run the command given below to create a login.
    Specify a secure password in the command.
    CREATE LOGIN DBMon_Agent_User WITH PASSWORD = 'Password123'
  2. Run the following command in your Azure SQL database to create a user account for the newly created login:
    CREATE USER DBMon_Agent_User FOR LOGIN DBMon_Agent_User WITH DEFAULT_SCHEMA = dbo
  3. While connected to your Azure SQL database, run the command given below to grant the pre-requisite roles and privileges:
    grant VIEW DATABASE STATE to DBMon_Agent_User
  4. Provide read-only access to the master database for your user account to monitor the database.
    -- For custom databases, replace 'master' with the name of your custom database. For example: USE custom_database;
    USE master; 
    EXEC sp_addrolemember 'db_datareader', '(your_user_name)'