title: Adding a new user with specific permissions to an Azure Sql Database using Active Directory Integrated Authentication
body: <p>I have an Azure SQL Server with two databases for which I'm trying to use Azure Active Directory Integrated Authentication. One of these databases is critical and most of the users need to be granted only 'read' access for this database.</p>
  
  <p>To add a new user with a 'Reader Role', I did the following:</p>
  
  <ul>
  <li><p>Added the user with Reader role under Access Control(IAM) from the Azure portal.
  The user wasn't able to connect after this step.</p></li>
  <li><p>Then I tried adding the user using the following commands:</p>
  
  <p>CREATE USER [name@domain.com] FROM EXTERNAL PROVIDER;</p>
  
  <p>sp_addrolemember db_datareader, [name@domain.com];</p></li>
  </ul>
  
  <p>The user is still not able to connect to the server using AAD Integrated Authentication. In both the cases I get an Anonymous Logon error.</p>
  
  <p><a href="http://i.stack.imgur.com/qNN2Z.png" rel="nofollow">Click to see the snip of the error message</a></p>
  
  <p>Am I missing something? If not, is there any other way I can add users with specific permissions to the database?</p>