Question: I moved a database from SQL Server 2012 to Azure. I don't want to use the user `master`, so I created a user `test`. This is what I did for database XXX on Azure:

```
create user test from login test with default_schema=[dbo]
exec sp_addrolemember 'db_owner','test'

```

I checked, and the database objects I am interested in are all in the schema `dbo`. The table `Users` is in the schema `dbo`.

The connection string in my web project has `test` as the login. It produces the error message:

```
The SELECT permission was denied on the object 'Users', database 'XXX', schema 'dbo'

```

What does the error message mean and what can I do to let user `test` access the database XXX?

Answer: 
I had just, for the first time, used the Plesk panel on my website hosting service to download an "Export Dump" file of my hosted SQL Server database.

After needing to use a different StackOverflow Question/Answer to understand how to use what I had downloaded, then in SQL Server Management studio I went into Security | Logins and pointed one of the Logins to the new local database I now had and tried to run my app. I got the error message in this Question (except my error message mentioned 'Keys' rather than 'Users').

So then, I followed the Answer provided here by Kellen Stuart, and it was a help for sure. The difference in my situation was, instead of the login having all the Database roles checked, my login had none of the roles checked.

So for my purposes (developing an app on my local workstation) I just needed to check db\_owner, and I was good to go.
Grant permissions for that user is needed