Software⏱️ 2 min read📅 2026-05-31

How to Fix: The SELECT permission was denied on the object 'Users', database 'XXX', schema 'dbo'

Azure database permission issue

Quick Answer: Check the Azure portal for the database and ensure that the 'test' user has the necessary permissions, specifically 'SELECT' on the 'dbo' schema.

The error message you're seeing is due to the fact that the test user does not have the necessary permission to access the database objects directly. This is because the master user, which was used during the migration process, still has some permissions and connections in the database.

✅ Best Solutions to Fix It

Method 1: Granting Permission Directly

  1. Step 1: Run the following command to grant the SELECT permission on the database object 'Users'

Method 2: Re-creating the Database User

  1. Step 1: Drop the existing database user test:

Method 2: Re-creating the Database User (continued)

  1. Step 2: Create a new database user and grant it the necessary permissions:

To fix this issue, you can either grant the SELECT permission directly on the database object or re-create the database user with the necessary permissions. Try one of these methods and see which works best for your situation.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions