How to Configure Azure SQL Create User

Published
Length
3 min read

Luis Felipe Dias

All posts

You run an azure sql create user step to map an identity inside your database. Then you assign that database user to a role to control what tables they read or change. Many teams start by giving engineers broad roles so they can fix issues fast. Broad permissions let one bad query change production tables or expose private fields. How the azure sql create user workflow works In this engine, a database user is the identity of a login inside a specific database. The platform supports thirteen d

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You run an azure sql create user step to map an identity inside your database. Then you assign that database user to a role to control what tables they read or change. Many teams start by giving engineers broad roles so they can fix issues fast. Broad permissions let one bad query change production tables or expose private fields.

How the azure sql create user workflow works

In this engine, a database user is the identity of a login inside a specific database. The platform supports thirteen different types of database users to match different setup needs. You pick the user type based on how many databases the person needs to reach.

Some people need to work across many databases on the same server instance. For them, admins usually set up a SQL user tied to a login in the master database. Other people only need to reach one or a few databases. For those people, a contained database user is a strong option. A contained user is a SQL user with a password that is not tied to a master login. Before you add one, an admin must turn on contained databases on the server and database.

Assigning fixed database roles after user creation

Once the user exists, it belongs to the public role and has basic permission to log in. All roles, including the public role, hold this basic permission by default. To let the person do real work, you add the user as a member of a role.

Fixed database roles give you pre-built sets of permissions across the whole database. You cannot change the permissions assigned to these fixed database roles. The data reader role lets members read all data from all user tables and views. The data writer role lets members add, delete, or change data in all user tables. If you want to block someone, you can use the deny roles instead. The deny data reader role stops a user from reading any user tables, views, or their metadata. The deny data writer role stops a user from adding, changing, or deleting any table data.

At the top sits the database owner role. Members of this owner role can run all setup and maintenance tasks. In SQL Server, this owner role can even drop the entire database. Giving this role to daily users creates a huge risk for your team.

Azure RBAC + User Provisioning (SCIM): architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native user roles leave open in production

Setting up users and fixed roles solves the basic problem of who can log in. It also draws a rough line between people who read data and people who write data. Still, native roles judge the user at login time and apply across every table at once.

A member of the data reader role can read every column in every user table by default. If a table holds emails, phone numbers, card numbers, or national IDs, that user reads them in plain text. Native roles do not rewrite matched fields in query results on the fly. In the same way, the data writer role allows changes to all user tables at all times. It cannot check each statement in flight or ask a peer to approve a risky update first. Teams also struggle when developers share static passwords for contained users across many laptops.

Govern SQL Server queries and responses in flight

Table grants decide which SQL Server objects a caller may touch. They do not check query intent or rewrite sensitive values in results across every client and agent. By design, hoop.dev sits inline in the TDS wire protocol next to SQL Server as a sidecar for your SQL Server. On every production batch from an engineer or AI agent, hoop.dev decides to pass, mask, block, or hold it for approval.

With hoop.dev guardrails and hoop.dev data masking, banned statements are refused or held for review, matched sensitive fields in supported result columns are masked in memory, and each decision is logged. Check out the code on GitHub.

Frequently asked questions

What is the difference between a login and a database user?

A login sits in the master database and works across many databases on an instance. A database user is the identity inside one specific database. You can also use a contained database user with a password that skips the master login.

Can I edit the permissions inside a fixed database role?

No, the permissions assigned to fixed database roles cannot be changed. For example, the data reader role always grants read access to all user tables and views. If you need custom rules, you must build a custom role instead of editing a fixed one.

How do I stop a user from reading or writing table data?

You can add the user to a fixed deny role inside the database. The deny data reader role blocks reading any data or metadata from user tables and views. The deny data writer role stops the user from adding, changing, or deleting data.

The query runs. The emails stay hidden.