Grant user read only access to tables in Azure Management Portal

I want to give a user read only access to a database in the management portal.

I did the following:

CREATE LOGIN login1 WITH password=<password>;
CREATE USER testuser FROM LOGIN login1;
EXEC sp_addrolemember 'db_datareader', 'testuser';

When I login with login1 to the database via Management Portal it says:

"The current user does not have VIEW DATABASE STATE permissions on this database."

How can I set read-only access for the portal? Do I really have to set:

 GRANT VIEW DATABASE STATE TO testuser;
July 18th, 2013 8:09am

Just tried to repro this issue and here is the process which you need to follow - 

1. Create a LOGIN in Master database. 

CREATE LOGIN test_user WITH password='Pa55word';

2. Establish a connection with your regular login to the User database and run 

CREATE USER test_user FROM LOGIN test_user;
EXEC sp_addrolemember 'db_datareader', 'test_user';

3. Login to User database using your test_user login and you will be good.

Let me know if you still has issues.

Free Windows Admin Tool Kit Click here and download it now
July 18th, 2013 6:14pm

Sorry, seems like I didn't explain my problem well enough. I already created a user this way and I followed your steps to be sure that I did everything in the right way. When I do so I have no problem in connecting to the database and reading data when using SQL Server Management Studio.

I was wondering if it is also possible to use the sql azure management portal for login:

https://<servername>.database.windows.net/

If I do so, I can login, but get the error:

Failed to create context.
The current user does not have VIEW DATABASE STATE permissions on this database.

If I change to Design View it says:

<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>InternalError:3471c209-62be-353d-8abe-073598db0627</m:code><m:message xml:lang="en-US">There was an internal server error that occurred during this request.</m:message></m:error>

So my question is: Is it possible to give read-only acces to a user for the sql Azure Management Portal?


July 19th, 2013 2:53am

Any ideas? Or is this not possible?
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2013 2:22am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics