Microsoft SC-500 Practice Test 37
Question 360
A Function currently reads a Key Vault secret from a plain environment variable inserted by the deployment script. Which refactor follows least privilege?
- Enable a system-assigned managed identity and supported Key Vault reference or secret retrieval with narrow vault authorization.
- Copy the secret into the Function source repository with a comment identifying its owner.
- Give the Function Managed Identity Global Administrator and disable the vault firewall.
- Use a static administrator password shared across all Functions for convenience.
Explanation
Correct Answer
A:Allow the Function identity to read only the needed secret, configure appropriate supported Key Vault reference or SDK access and verify any vault network restriction. Remove plaintext deployment copies and prevent secret values from appearing in function logs. Test renewal behavior so credential rotation does not require embedding a fresh key into source code. Test secret renewal after changing the vault value, and keep the effective identity and access policy under audit.
Incorrect Answers
B:Repository files can be cloned, scanned and retained in history. A comment does not protect the secret; use runtime identity-backed retrieval. Committed plaintext credentials remain accessible through repository clones and history even after a visible file is deleted.
C:Directory administration is unnecessary to read one vault secret, while opening network access creates additional exposure. Grant scoped data-plane permission only. Global Administrator is unnecessary for routine Key Vault data-plane reads and weakens tenant security if compromised.
D:Shared persistent credentials increase blast radius and complicate revocation. Per-workload identity reduces credential distribution and supports clearer audit trails. One shared static credential creates cross-application dependencies and makes incident revocation disruptive for unrelated Functions.
Question 361
A developer accidentally pasted an Azure Function master key into a public support ticket. What response is appropriate?
- Remove the ticket comment but keep the Function key active because it is not a user password.
- Change the Function's displayed name and assume old URLs or keys will stop working.
- Rotate the exposed key, investigate invocation activity and adopt verified user authorization for sensitive operations.
- Disable diagnostic logs to prevent further copying of the exposed value.
Explanation
Correct Answer
C:Identify which function or host key leaked, replace or revoke it through the supported mechanism and update legitimate callers securely. Review related logs and API access during the exposure window. Treat function keys as shared secrets, not a substitute for Entra user authentication when personal records or privileged actions are involved. Verify the leaked key is rejected after rotation and that a legitimate user token still has appropriate application rights.
Incorrect Answers
A:Function keys can authorize function-level access or administration depending on type. Deleting the comment does not invalidate copies already made by readers. Every copy of a leaked Function key may remain usable until rotation, even if the support ticket is edited.
B:Renaming a resource does not automatically revoke exposed keys. Explicit key rotation and access review are required. Resource naming does not revoke underlying host keys or block previously valid authenticated invocation paths.
D:Logging hygiene matters, but disabling investigations does not revoke a compromised credential. Retain safe telemetry while rotating the key and removing unnecessary secret output. Turning off diagnostics removes evidence of key misuse while leaving the exposed credential active if not rotated.
Question 362
A Logic App receives sensitive customer data through an HTTP trigger whose URL is being shared outside approved systems. Which protection should the owner apply?
- Document the trigger URL as confidential while leaving unrestricted callers able to use it.
- Put customer data into URL query parameters so the trigger can identify requests more easily.
- Assign every external caller subscription Reader before allowing the workflow to execute.
- Use supported trigger authentication, access restrictions or a secured gateway, and verify approved callers only.
Explanation
Correct Answer
D:Identify whether the Logic App plan and trigger support Entra authorization, IP/network restrictions or an API Management boundary. Require the intended credentials and validate request identity and payload schema. Test an unauthorized caller and prevent private customer content from entering diagnostic logs unnecessarily. Use negative tests for unauthorized callers as well as successful processing of a controlled approved customer payload.
Incorrect Answers
A:A secret URL can be copied or leaked, and documentation alone cannot prevent unauthorized requests. Enforce supported authentication and network restrictions for sensitive workflows. Sensitive HTTP trigger URLs can leak in browser history or activity logs, so the application must enforce caller authorization.
B:URLs may be logged and forwarded, exposing private values. Use protected request bodies and authenticated callers rather than putting sensitive content into address strings. Query strings are routinely logged by proxies and clients, making them a poor location for private customer identifiers.
C:Management Reader does not automatically provide safe trigger authentication, and broad Azure role grants to customers are inappropriate. Use supported Logic Apps access controls. Azure Reader is a management role and cannot substitute for supported HTTP trigger authentication of external clients.
Question 363
A Logic App integrates a billing SaaS and an internal ERP. Its connectors use shared administrator accounts. What security redesign is appropriate?
- Share the administrator password in the workflow definition so maintainers can fix failures faster.
- Configure connector identities with only required actions and secure authentication material for each downstream system.
- Give every workflow operator tenant-wide Global Administrator to avoid connection approval prompts.
- Disable the billing API's authorization checks because the Logic App executes within Azure.
Explanation
Correct Answer
B:Review every API connection's permissions, supported managed identity or OAuth configuration and exact data flows. Limit read/write operations by business requirement and separate production credentials from test systems. Monitor connector failures, keep secrets out of inputs/outputs where possible, and verify unauthorized connector operations are denied. Verify each connector can perform the needed API action but cannot read or change unrelated ERP or billing records.
Incorrect Answers
A:A stored credential in code or run history can leak and grants unnecessary cross-system capability. Use protected connection configuration and narrower access. A connector definition or run-history record can expose stored administrator secrets to additional operators or automated exports.
C:Tenant-wide privilege does not replace the specific SaaS or ERP authorization contract and unnecessarily expands operator permissions. Scope the connector and operator roles separately. Global Administrator does not automatically configure a third-party SaaS API grant and would create excessive directory authority.
D:Azure-hosted execution does not prove a caller is authorized to change external billing records. Keep downstream authorization independent. A cloud-hosted workflow can still be abused to access external systems unless each service independently authorizes its calls.
Question 364
A regulated workflow's Logic Apps run history exposes full tax identifiers in action inputs and outputs to support staff. What should the team configure?
- Apply supported secure inputs/outputs settings for sensitive actions and restrict access to remaining run-history metadata.
- Disable all workflow execution logs permanently, including security failures and operation status.
- Move the full identifier into the Logic App's display name.
- Require only an HTTPS trigger, assuming transport encryption hides every payload from authorized log readers.
Explanation
Correct Answer
A:Identify the actions containing personal values, prevent those payloads from being surfaced in routine histories where supported and apply least-privilege workflow access. Maintain necessary incident diagnostics without printing protected fields. Test that normal operators cannot retrieve sensitive data while approved execution continues and compliance records remain intact. Review which actions can safely retain metadata without disclosing request bodies and customer tax identifiers.
Incorrect Answers
B:Removing all diagnostics can compromise incident response and does not address other copies of sensitive payloads. Use selective secure input/output controls and scoped access. Disabling all history can conceal real failures and prevent response teams from identifying unauthorized workflow activity.
C:Resource names may appear broadly in portals and logs. Moving personal data into metadata increases exposure rather than reducing it. Resource display names are commonly visible in portals and logs and should never be used to carry customer secrets.
D:TLS protects network transmission but does not restrict data shown in run-history storage or console views. Apply payload visibility and role restrictions. HTTPS encrypts network transmission but does not hide the resulting stored payload from people with portal log access.
Question 365
An App Service REST API returns internal customer information to anyone with its URL. Which control should be deployed?
- Only a robots.txt rule instructing search engines not to index the endpoint.
- An SSL certificate alone, because HTTPS proves the caller is an employee.
- Enable supported Entra authentication and validate token audience, issuer and user/role authorization for each resource.
- Increase the API response timeout so only persistent users can complete a request.
Explanation
Correct Answer
C:App Service Authentication can enforce a sign-in boundary where applicable, but the API must also authorize access to specific records and actions. Validate intended token claims, apply least-privilege role policies and test anonymous and wrong-audience requests. Add appropriate networking restrictions for sensitive administrative routes, without assuming a login alone protects all customer data. Test wrong-audience tokens and a legitimate user accessing another user's record to prove the application data boundary.
Incorrect Answers
A:Search crawler guidance cannot stop an authenticated or anonymous HTTP client from invoking the endpoint. Use actual identity validation and authorization checks. An attacker can call the API directly even if its route is excluded from search crawler indexes.
B:TLS normally protects the channel and identifies the server, not the user's business role. Valid tokens and application permission checks are still required. TLS does not automatically establish the end-user role needed to authorize a particular customer's record.
D:Connection duration does not establish trusted identity and can cause availability problems. Require authentication and data-level authorization. Timeouts do not distinguish trusted employees from anonymous callers and can degrade service availability during attack.
Question 366
An App Service web app must connect to Azure SQL through a database private endpoint. Its existing SQL firewall rule allows the whole internet. Which redesign is appropriate?
- Keep the public SQL firewall open and rely on the application's DNS name being difficult to guess.
- Integrate App Service with the appropriate VNet and private DNS for the SQL endpoint, then restrict SQL public access.
- Give the App Service Managed Identity subscription Owner and leave routing unchanged.
- Remove the SQL endpoint's TLS requirement because private networks are inherently confidential.
Explanation
Correct Answer
B:Configure a supported App Service outbound VNet integration and ensure the SQL server hostname resolves to the approved private address from that app. Validate routing, SQL permissions and application connectivity before disabling the public path. Test from an unauthorized network to ensure the database cannot be reached through the old broad firewall exception. Test name resolution and a real SQL connection from the App Service instance before disabling the old public path.
Incorrect Answers
A:Publicly exposed database connectivity increases attack surface independent of hostname secrecy. Use private endpoints and correct egress path. A public SQL firewall may expose database ports beyond the intended web application's private VNet integration path.
C:Owner does not establish private SQL connectivity and would create unnecessary management privilege. Preserve least-privilege database authentication separately. Managed Identity permissions can authorize a database call but do not route it through the private endpoint automatically.
D:Private address space does not replace authenticated encryption or server identity validation. Keep TLS and restrict the network path appropriately. Private network addresses do not provide cryptographic server authentication or confidentiality by themselves, so TLS still matters.
Question 367
An App Service application stores an external API key directly in plain app settings that are copied into deployment logs. What should the developer change?
- Use managed identity and supported Key Vault references, secure permissions and remove exposed deployment copies.
- Copy the key into source code so app settings no longer contain it.
- Give every deployment engineer full Key Vault Administrator so the app can read one secret.
- Disable HTTPS to reduce overhead when retrieving the key from its issuer.
Explanation
Correct Answer
A:Configure an identity for the web app, grant only required vault data-plane access and use protected reference resolution where supported. Rotate the key if it appeared in accessible logs, restrict app-setting readers and test resolution after deployment and slot changes. Avoid outputting the value during troubleshooting; a successful secret lookup does not justify publishing it. Use a vault reference with narrow data permissions and confirm no old secret value remains in deployment diagnostics.
Incorrect Answers
B:A repository copy makes credential exposure more persistent through cloning and version history. Use a protected external secret store instead. Source control copies can persist indefinitely and may be distributed to contributors not approved for production credentials.
C:Developer permissions do not automatically represent the app's runtime identity, and vault administration is too broad for simple secret read. Scope the workload's access. Vault administrator controls more than reading one secret and should not be assigned to all deployment engineers.
D:Transport encryption is important for protecting secrets. Its removal would exacerbate leakage and does not solve insecure configuration storage. Disabling HTTPS would increase exposure of the fetched secret across the app-to-vault communication path.
Question 368
An App Service staging slot accidentally shares a production payment API secret. The owner wants to prevent future slot swaps from exposing the live credential. What should it configure?
- Use a single common secret for all deployment slots to reduce differences.
- Rename the staging slot, leaving its inherited settings unchanged.
- Disable all deployment slots to avoid reviewing configuration.
- Mark sensitive settings as slot-specific and validate identity, Key Vault references and swap behavior before release.
Explanation
Correct Answer
D:Separate production and staging secrets and target resources using the platform's supported deployment-slot settings. Test a dry run or safe swap procedure to confirm credentials and network settings stay with the intended environment. Revoke any production credential exposed to staging and keep audit evidence of configuration changes. Check that production and staging each retain the intended identity, API endpoint and credential after a controlled slot swap.
Incorrect Answers
A:Sharing production credentials with test environments widens access and can trigger real payments during validation. Separate slot-specific values and identities where supported. Staging may be accessible to more developers or test infrastructure, so it should not inherit live payment authority.
B:Renaming does not prevent credential propagation during slot swaps. Review actual sticky or slot-specific application settings and references. Slot name changes do not necessarily alter sticky settings or secret references that the platform swaps during release.
C:Slots can be useful for controlled releases. Security should define their distinct settings rather than remove a capability solely due to misconfiguration. Deployment slots remain useful when their sensitive configuration is deliberately isolated and tested before swap.
Question 369
A public ecommerce application faces common SQL injection and cross-site scripting probes. Which Azure edge control should the team deploy?
- A storage account private endpoint as the sole web application attack defense.
- A supported Azure WAF policy with relevant managed rules at Application Gateway or Azure Front Door.
- A DNS alias pointing to the same web application without filtering requests.
- An Azure RBAC Reader assignment for every public visitor.
Explanation
Correct Answer
B:A Web Application Firewall can inspect HTTP(S) request patterns and enforce supported managed OWASP protections. Attach the policy at the intended entry point, evaluate blocking behavior and tune legitimate exceptions. Continue fixing vulnerable application code: WAF is a compensating layer, not proof the backend has no injection weaknesses. Review the managed ruleset's false positives against the application's genuine query formats before switching to enforced blocking.
Incorrect Answers
A:Storage network isolation protects a specific back-end service but does not inspect HTTP requests arriving at a public web app for common exploit patterns. An attacker can inject a public API request before it ever reaches a storage account private endpoint.
C:Changing a host label does not block malicious HTTP payloads. The edge requires an actual WAF policy and correct routing. A DNS alias may point to the identical vulnerable backend with no HTTP request inspection in the path.
D:Management Reader does not protect request bodies against injection. Public users should never require broad Azure resource management roles to browse the application. Management Reader is not a web application attack prevention layer and is unrelated to public customer authorization.
Question 370
A WAF policy blocks legitimate search queries because one managed rule suspects SQL injection. Security wants to keep protection active. What should it do?
- Examine WAF request logs and rule IDs, confirm the false positive and apply a narrow supported exclusion or rule adjustment.
- Turn off the whole managed ruleset for every site because one customer was blocked.
- Allow every request from the internet while logging only successful purchases.
- Change the web app's display name to avoid matching the managed WAF rule.
Explanation
Correct Answer
A:Identify the exact input field and legitimate request pattern, compare blocked samples with the triggered rule and use the smallest supported exception. Test both the valid query and a malicious probe to ensure protection remains effective. Monitor after rollout and document why the exception is justified; disabling the entire WAF would conceal other threats. Retain a test that should still trigger the attack rule, so a false-positive exception does not broaden the bypass.
Incorrect Answers
B:A blanket disablement removes broad protections for unrelated attacks. Tune the specific false positive after reviewing evidence. One blocked search phrase does not justify removing unrelated protections for SQL injection or cross-site scripting.
C:Logging cannot replace enforcement against hostile input. Preserve WAF blocking for genuine attack patterns and correct the narrow exception. A logging-only policy may record attacks while still allowing their requests to reach a vulnerable application backend.
D:WAF analyzes requests and configured conditions, not the friendly resource name alone. Diagnose and tune the actual rule. WAF request matching depends on parameters and rule logic, not the friendly Azure resource display name.