Can Sharepoint Connect to SQL Server
Teams often ask can sharepoint connect to sql server for business data. Yes, SharePoint links to SQL Server through data connectors and custom apps. This link lets portal users view and edit table records in real time. Engineers and AI agents also query the same SQL Server databases every day. Knowing how database identities and roles work keeps your company data safe. How can sharepoint connect to sql server in practice SharePoint reads SQL Server tables through connector services or custom
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.
Teams often ask can sharepoint connect to sql server for business data. Yes, SharePoint links to SQL Server through data connectors and custom apps.
This link lets portal users view and edit table records in real time. Engineers and AI agents also query the same SQL Server databases every day. Knowing how database identities and roles work keeps your company data safe.
How can sharepoint connect to sql server in practice
SharePoint reads SQL Server tables through connector services or custom web parts. The portal sends queries over the network using a set database identity. SQL Server checks this login before it returns any rows to SharePoint.
A database user is the identity of a login inside a database. SQL Server supports thirteen types of database users for different access needs. When someone needs many databases on one instance, admins use a master login. This SQL user ties back to a login in the master database.
Some apps or people only need one or a few databases. For this case, a contained database user with a password works well. Contained users do not tie to a login in the master database. First, an admin must turn on contained databases on the server and database.
Engineers and AI agents use these same user types to run queries. They log in with a SQL user to inspect tables and fix bugs.
Security tradeoffs of static roles and shared logins
After you create a user, you assign database roles to control access. Every database role, including the public role, has basic connect rights. SQL Server includes fixed database roles for common read and write tasks. You cannot change the permissions assigned to these fixed database roles.
Members of the datareader role can read all data from all user tables. They can also read data from all views in that database. Members of the datawriter role can add, delete, or change table data. These write rights apply across all user tables in the database.
Kubernetes API Server Access + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Admins can also block access with deny roles when needed. The denydatareader role blocks reading any data from user tables and views. It also blocks reading metadata about those tables and views. The denydatawriter role stops a user from adding, changing, or deleting data. At the top level, the owner role controls all setup and maintenance tasks. Members of the owner role can even drop the database in SQL Server.
Static roles have clear limits during an active session. A SharePoint connector or AI agent with datareader reads every user table. Fixed roles cannot hide sensitive columns inside a single table. If a table holds card numbers or emails, the query returns them.
Shared logins also make audit logs hard to read. When five engineers share one SQL user, the log shows one name. You cannot tell which person ran a slow or risky query. Teams need query controls and data masking to protect live sessions.
Securing SQL Server access for engineers and AI agents
Modern teams put a security layer between users and SQL Server. Instead of sharing static passwords, engineers log in with their work identity. The system checks their role before sending any query to the database.
Data masking rules can rewrite sensitive fields in query results on the fly. This masks emails, phone numbers, card numbers, and national IDs during live queries. Teams can also require peer approval before someone runs a write query. Every query ties back to one person or AI agent in the log.
Add runtime guardrails beside SQL Server
Role grants and network rules are needed setup for SQL Server. Still, an allowed user or agent tool can send a bad delete or read raw customer fields over a valid session. In practice, hoop.dev sits inline in the TDS protocol beside the database as a sidecar for your SQL Server. For every query an agent or human runs in production, hoop.dev decides whether to pass, mask, block, or escalate it for review.
With hoop.dev SQL Server controls, rules refuse banned statements before they run, hold risky queries for human review, and mask matched sensitive values in supported result columns in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for HIPAA, PCI DSS, SOX, and GDPR audits. See the source on GitHub.
Frequently asked questions
What SQL Server role gives SharePoint read-only access?
The fixed datareader role gives read access to all user tables and views. You can pair it with denydatawriter to block all data changes.
Should I use a master login or a contained database user?
Use a login in master when a user needs many databases on one server. Use a contained user when access stays inside one or a few databases.
Can I edit the permissions of a fixed database role in SQL Server?
No, SQL Server does not let you change permissions on fixed database roles. To protect specific fields like emails or card numbers, add data masking rules.
Related guides
In this post