Microsoft SC-500 Practice Test 5
Question 40
A customer needs to download one private Blob file for the next 30 minutes without receiving a storage account key. Which Azure Storage authorization is a strong fit?
- Create a user delegation SAS with only required read permission and short expiration
- Share the storage account master key for one hour by email
- Enable anonymous public access to the entire container
- Grant the customer permanent Storage Blob Data Owner for the subscription
Explanation
Correct Answer
A:A user delegation SAS, where supported, can be authorized through Microsoft Entra credentials and grant limited Blob access without distributing the account key. Restrict the resource, read permission, validity window and HTTPS usage as appropriate. Deliver the token through a controlled channel and review expiration and revocation options before use.
Incorrect Answers
B:An account key provides far broader authority than a single time-bounded download and can be reused outside the intended request. Email delivery compounds exposure. Use a scoped short-lived access grant instead.
C:Anonymous container access makes the resource readable by anyone with the URL while public access remains configured. It does not enforce the named customer's permission or expiry requirement. Retain private container settings.
D:A permanent high-privilege Blob Data Owner assignment greatly exceeds a 30-minute read operation and expands the potential blast radius. Use a temporary scoped grant with limited actions and expiry instead.
Question 41
An account SAS URL was accidentally committed to a public repository. Security wants to stop unauthorized use. Which response is most appropriate?
- Remove the URL from the README and assume earlier copies disappear
- Extend the SAS expiry to reduce the need for future key rotation
- Rename the public repository without changing storage authorization
- Revoke or invalidate the underlying SAS authorization and rotate exposed signing keys when applicable
Explanation
Correct Answer
D:SAS revocation depends on whether a stored access policy, account key or other signing path applies. Identify the token type, invalidate its authority, rotate compromised account keys where appropriate and replace legitimate clients with scoped credentials. Monitor affected resource reads and remove public exposure as part of the incident response.
Incorrect Answers
A:Removing one visible copy does not invalidate a credential that may have been indexed, cloned or logged elsewhere. Treat the SAS as exposed and execute a supported revocation path. Then investigate access logs and recover safely.
B:A longer expiration allows more time for unauthorized access. It worsens the impact of the leak rather than addressing it. Reduce validity and revoke the authorization through the relevant key or policy mechanism.
C:Changing repository names has no effect on the token signature or service authorization. Anyone who already copied the URL may continue to use it. Revoke the compromised grant and inspect for access.
Question 42
Employees can open an Azure Files share but are unexpectedly denied one subdirectory. The share-level Azure RBAC role is correct. What should be checked next?
- The virtual machine's CPU architecture
- The applicable file/directory ACLs and effective identity permissions
- The date of the most recent App Service deployment
- Whether the storage account uses geo-redundant replication
Explanation
Correct Answer
B:Azure Files identity-based SMB authorization can involve both share-level RBAC and file or directory ACLs. A principal may be allowed at the share boundary yet denied by a more specific file permission. Check group membership, ACL inheritance and the actual identity used, then grant only the required access.
Incorrect Answers
A:CPU architecture does not determine file system permission evaluation for an otherwise functional share. The reported denial is specific to a directory. Inspect the directory-level access model rather than hardware.
C:App Service deployment timing is unrelated unless it changed the caller identity or permissions, which the scenario does not suggest. Focus on effective share and directory authorization, and validate whether the accessed path inherits correct ACLs. Avoid unrelated application redeployment as a troubleshooting shortcut.
D:Storage redundancy changes availability and durability characteristics, not which directory ACL grants a user access. Keep the current replication design and evaluate the file system authorization path. Geo-redundant replication changes where file data survives a regional outage; it does not change the NTFS-style directory authorization that denies this user.
Question 43
A consultant is given a storage account access key merely to read one project container. Which long-term approach best reduces privilege exposure?
- Continue sharing account keys but change the consultant's job title
- Enable account-wide anonymous Blob access for project files
- Grant narrowly scoped Microsoft Entra Blob data permissions or short-lived delegated access
- Provide the consultant subscription Owner for easier troubleshooting
Explanation
Correct Answer
C:Microsoft Entra role assignments at the smallest suitable scope, or a short-lived delegated SAS for the needed action, reduce reliance on broad account keys. Validate the consultant identity, limit permissions to required reads, set an expiration where practical, and monitor data access. Revoke the old key if it was distributed beyond safe control.
Incorrect Answers
A:An account key grants broad storage authority beyond one project container and can be copied or reused. A job title does not enforce a technical boundary or invalidate copied credentials. Replace key sharing with a narrower supported access method and monitor prior key use.
B:Anonymous access allows uncontrolled readers, contradicting access limited to an approved consultant. It cannot provide individual accountability and may reveal sensitive project content. Keep the container private. The consultant would no longer be the only person able to read the container; anonymous users could retrieve files without being tied to a reviewed Entra principal.
D:Subscription Owner is a highly privileged management role and does not express the limited data download permission. It introduces additional infrastructure change capabilities. The consultant should receive only necessary Blob data access.
Question 44
A company wants Azure SQL administrators to authenticate using organizational identities, with MFA and lifecycle governance instead of SQL passwords where practical. What should be configured?
- Microsoft Entra authentication for Azure SQL with a carefully planned SQL authentication transition
- Anonymous SQL access combined with TLS encryption
- A public NSG rule allowing every inbound TCP connection to the database
- A backup retention policy as a substitute for administrator authentication
Explanation
Correct Answer
A:Microsoft Entra authentication can centralize user lifecycle and supported multifactor/conditional access controls for Azure SQL. Configure an appropriate Entra administrator and principal access, validate client compatibility, and restrict SQL-only authentication according to policy. Test dependent applications before retiring passwords. Network restrictions and database permissions remain separate requirements.
Incorrect Answers
B:TLS protects transport but does not supply an authenticated user identity or database authorization. Anonymous administrative access would be unsafe. Implement supported Entra sign-in and database-level privilege controls rather than rely on encryption alone.
C:A broad public ingress rule expands the attack surface and does not establish secure identity. Network access and authentication are distinct controls. Restrict the database endpoint while configuring stronger supported administrator authentication.
D:Backups protect recoverability and do not determine which people can administer a database. An attacker with unrestricted SQL credentials can act before a backup is taken. Enforce correct administrator identity and least privilege.
Question 45
An Azure SQL logical server is reachable from the public Internet, although the databases use encryption at rest. The security policy requires private connectivity. What should the engineer change?
- Increase database storage capacity so encryption cannot be bypassed
- Configure an approved Azure Private Endpoint and restrict public network access
- Change the default database schema to a more obscure name
- Disable audit logging to reduce the number of publicly visible errors
Explanation
Correct Answer
B:A private endpoint provides access to the Azure SQL service through a private network interface, while disabling or restricting public access addresses the exposure requirement. Verify private DNS, routes, firewall configuration and authentication after the change. Transport and at-rest encryption continue to complement, not replace, network and identity controls.
Incorrect Answers
A:Capacity settings are unrelated to network reachability. Encryption at rest does not prevent remote clients from reaching the SQL endpoint. Apply private connectivity and access restrictions rather than rely on unrelated database settings.
C:Changing a schema name does not alter the SQL server listener or firewall. Attackers may still connect to a public endpoint. Enforce actual network and identity restrictions instead of hiding object names.
D:Disabling audit data makes investigations harder and does not close a network path. Keep approved logging and configure the database server public network policy plus private endpoint connectivity. Test from both allowed internal clients and denied external sources.
Question 46
An Azure SQL database already uses Transparent Data Encryption. A new policy requires the company to manage the encryption key and recovery process. What should it evaluate?
- Use a SQL query to disable encryption whenever keys are unavailable
- Publish the service-managed encryption key in the source repository
- Configure supported TDE with a customer-managed key backed by Azure Key Vault or Managed HSM
- Create more database user accounts without changing encryption settings
Explanation
Correct Answer
C:Azure SQL supports TDE with customer-managed key options that give the organization more control over the key lifecycle. Confirm service and tier support, managed identity access, backup/recovery, and the impact of key deletion or expiry. Test the deployment before enforcing key control, because an unavailable key can affect database availability.
Incorrect Answers
A:Disabling encryption undermines the requirement and may be unsupported for the service configuration. Key availability should be addressed through secure lifecycle and recovery design. Use supported customer-managed key features instead of bypassing encryption when operations fail.
B:Encryption keys must remain protected and controlled, not published in source. A service-managed key is not designed to be copied into application code. Configure approved key-management integrations and protect access to the key resource.
D:More database accounts can complicate authorization but does not change TDE key ownership. Identity access and data-at-rest encryption must each be configured for their own objectives. The policy concerns the key-management boundary.
Question 47
A shared SQL database stores payroll records for several client organizations. Application users must see only the rows belonging to their own tenant. Which database security feature directly addresses this?
- A global backup vault with longer retention
- Database-level read access for all application users without further filters
- A firewall rule based only on the application server subnet
- Row-level security with an appropriate tenant-aware filter predicate
Explanation
Correct Answer
D:SQL row-level security can enforce access predicates so queries return only rows permitted for the current execution context. Implement a trusted tenant identity mapping, test adversarial contexts and cross-tenant joins, and avoid allowing the application to forge the predicate context. Review privileged bypass paths and audit sensitive access.
Incorrect Answers
A:Backups aid recovery but do not restrict which rows an authorized application session can query. The privacy requirement concerns active database reads. Apply a data authorization filter rather than rely on storage retention.
B:Broad database read permission would expose every tenant's payroll rows to any authorized user. Application-layer checks may help but should not replace supported database enforcement when the requirement is strong row isolation.
C:Network firewall rules limit which machines may connect but cannot distinguish tenant A from tenant B when they share an application backend. A trusted network does not imply access to all tenant records. Enforce per-row authorization.
Question 48
A web API constructs SQL statements by concatenating untrusted customer input. The database already has TDE and private networking. What change most directly addresses SQL injection?
- Use properly parameterized queries with least-privilege database accounts
- Disable all database encryption so queries can be inspected
- Allow public SQL ingress for easier debugging
- Add a random number to every SQL table name
Explanation
Correct Answer
A:Parameterized queries separate SQL code structure from user-supplied values so input cannot simply become executable syntax. Pair prepared statements with least-privilege database identities, server-side validation and monitoring. TDE and private endpoints protect other boundaries but cannot make unsafe query construction safe. Verify the application uses parameters consistently, including dynamic filters and sorting.
Incorrect Answers
B:Encryption is unrelated to how the application parses SQL. Disabling it would weaken data confidentiality while leaving the injection vulnerability intact. Fix query construction and authorization, and test malicious input handling at the application boundary instead.
C:Public ingress broadens attack opportunity and does not prevent malicious user strings from being interpreted as SQL. Even private endpoints do not protect an application from injection by authenticated clients. Parameterize queries.
D:Random table names are security by obscurity and do not stop injection against a vulnerable concatenated statement. A determined attacker can still affect query structure. Treat data as parameters and constrain the account's privileges.
Question 49
A finance department needs selected salary columns protected even from normal database administrators. Why might SQL Always Encrypted be preferable to relying only on Transparent Data Encryption?
- TDE automatically prevents every administrator from viewing queried plaintext values
- Always Encrypted protects selected column values through a client-side key boundary when correctly configured
- Always Encrypted eliminates every need for application identity and key governance
- Always Encrypted works by opening the database to anonymous queries
Explanation
Correct Answer
B:Always Encrypted is designed to protect designated columns so plaintext handling and keys can remain with trusted clients under supported configurations. Evaluate supported query patterns, driver behavior, key storage and application compatibility. Keep SQL authorization and auditing because encryption limits visibility but does not replace identity governance.
Incorrect Answers
A:TDE protects stored database files and backups at rest, but the database engine can decrypt data for authorized queries. It does not by itself prevent sufficiently privileged administrators from obtaining sensitive plaintext. Consider column-level client-side cryptographic controls.
C:Always Encrypted introduces important key provisioning, driver and access responsibilities rather than eliminating them. Clients still need correct authorization and secure key access. Evaluate operational implications for filtering, indexing and backup requirements.
D:Anonymous queries would make unauthorized access easier, not protect salaries. Column encryption should be combined with authenticated sessions, data roles and carefully controlled key access. It does not justify opening database network or identity boundaries.
Question 50
A security team needs reliable Azure SQL activity evidence for investigations. Select TWO complementary controls that make the audit trail useful.
- Use only a spreadsheet where operators manually record major events
- Disable audit retention and trust monthly infrastructure backups
- Enable Azure SQL auditing to an approved supported audit destination
- Use one firewall allow rule as proof that no SQL action ever failed
- Verify events arrive and protect the audit records with appropriate access and retention
Explanation
Correct Answers
C:Azure SQL auditing collects supported events relevant to database activity and can send them to a configured destination such as storage, Log Analytics or Event Hubs according to the service. Enable the policy at the appropriate scope and use a destination that meets investigation needs. The team must still confirm collection and secure the resulting evidence separately.
E:An enabled audit setting alone does not prove usable forensic evidence exists. Generate a controlled test event, confirm it appears in the destination, then apply appropriate log access and retention controls. This makes the audit trail both available when needed and resistant to unauthorized alteration or premature expiration. Preserve timestamps and identity context for correlation with other incident evidence.
Incorrect Answers
A:Manual records are incomplete, easy to omit and cannot reliably reconstruct actual SQL events. Auditing should be captured by the service and protected from unauthorized alteration. Operators can supplement but not replace system evidence.
B:Backups restore database content but do not automatically provide an event-by-event record of who performed specific operations. Removing audit retention would reduce forensic evidence. Configure a supported log destination and retention policy.
D:Firewall rules govern connections from networks; they do not record every query or permission change. An allowed client can still perform unauthorized SQL actions if its identity is compromised. Auditing supplies separate security evidence.