I'm trying to invite my remote team to access my SQL database hosted in Azure, and I'm a bit unsure about the best way to go about it. I've got a few steps laid out for creating logins and users, but I'm confused about why I need both. Here's what I'm thinking so far:
1. Create a login for the team member if they don't already have one.
2. Create a user in the database that corresponds to that login.
3. Assign roles like db_datareader and db_datawriter to the user.
It's been a while since I worked with databases outside of cloud services, so I could really use some advice on properly setting this up and making sure my remote team can access the database securely. Any tips?
5 Answers
It sounds like you're going the right route, but be careful if your SQL database is on a VM. Ideally, use Azure SQL and set up AAD authentication while keeping it secure and not open to the public. The user exists at the instance for authentication and at the database level for authorization, which is why they need both a login and a user.
Definitely! You can create users in the Azure AD tenant and then assign roles directly without needing to mess with server-level creations.
You might want to start by checking out the official Azure docs on authentication. It's better to avoid using SQL authentication if you can, especially for security reasons! Azure Active Directory (AAD) is a strong option for managing access.
Also, consider if your remote team has access to the same network as the database. Do you have a VPN setup? Granting database access is just one part; network security is crucial too!
Instead of giving access based on individuals, consider using a Security Group. This makes managing permissions so much easier in the long run, especially with remote teams. Add team members to the group instead of handling permissions one by one.
It’s really important to know which Azure SQL offering you're using here—like a SQL database, managed instance, or running it on an Azure VM. The method of granting access can vary quite a bit depending on that. AAD is definitely the way to go!

Exactly! Plus, creating an Azure AD user can simplify things even more, especially if you want to enable MFA for added security.