Let’s Get Certified
Module 05 / 16 · Implement a secure environment

Trace authentication and effective database access

Separate successful sign-in, user mapping, role membership and object privileges.

Trace authentication and effective database access

Work through the decision

A service principal obtains a token and connects to the server. Its report still fails with a SELECT permission error. The operator proposes giving the service the Entra administrator role. Where should the investigation begin?

Check your reasoning

Identify the identity actually executing the query and its database. Inspect the external user or mapping, role memberships and object-level permissions. A valid token establishes authentication but cannot by itself authorize a table read. Test the smallest intended grant with that workload identity.

Watch the source lesson at 59:12

Compare the choices

Microsoft Entra authentication
Validate tenant, token, identity and configured Entra integration. Authenticate before diagnosing SQL permissions.
Database user mapping
Identify the principal inside the target database. Restore or create the correct mapping for a login or external identity where supported.
Database role
Group database privileges by job function and manage membership as staff or workload identities change.
Object-scoped grant
Grant the required operation on the smallest appropriate securable and validate inherited privileges. Keep ownership separate.

Test the decision

Test that the service can read the approved reporting view and that direct access to restricted base data fails. An administrator’s successful query proves neither condition for the service.

Practice the guide skills

  1. Enable Microsoft Entra sign-in on an eligible SQL deployment. Watch 59:12 · Continue at 59:43 · Continue at 59:58
    Check your answer

    Configure the appropriate Entra administrator or supported SQL Server integration, provision the database principal and test a token for the expected tenant and audience.

  2. A legacy service uses SQL authentication and a new service uses managed identity. Watch 59:36 · Continue at 59:47
    Check your answer

    Inventory supported sign-in modes and restrictions on the VM or managed instance. Migrate and test dependencies before enforcing an Entra-only policy.

  3. A login connects to the server but cannot access a database. Watch 1:01:23 · Continue at 1:02:30
    Check your answer

    A login authenticates at the instance where applicable. A mapped or contained database user and its role memberships determine database authorization.

  4. Give a managed identity access to one reporting database. Watch 1:01:46
    Check your answer

    Resolve its Entra identity, create the external database user and grant a dedicated role the required permissions. Test from that identity against the intended database.

  5. Use a graphical tool to grant access to one view. Watch 1:08:45
    Check your answer

    Select the intended database principal and view, inspect its securable permissions and grant SELECT. Verify effective access separately for the view and its base table.

  6. A team needs to execute one procedure and nothing else. Watch 1:07:19 · Continue at 1:08:13
    Check your answer

    Grant EXECUTE on the required procedure to a workload role. Review inherited privileges and test a permitted operation and an out-of-scope operation.

  7. Distinguish a rejected sign-in from a denied statement. Watch 1:09:40 · Continue at 1:11:15
    Check your answer

    Inspect tenant, credentials, authentication mode and target database for sign-in failures. Once connected, inspect the current principal, role memberships and object-level permissions.

  8. A group is onboarding to read approved views. Sketch the T-SQL change. Watch 1:06:47 · Continue at 1:07:27
    Check your answer

    Create the external user where supported, add the user to a dedicated database role with ALTER ROLE, and grant SELECT on the approved objects to the role. Test the effective result.

Official objectives for this lesson

Related lesson · Explain effective resource access

Knowledge check

Trace authentication and effective database access quiz

Answer 3 questions. Check each answer for an explanation.