Friday, 24 January 2025

AZ-204 Question and Answer Part 15

Question #181
You are developing an ASP.NET Core app hosted in Azure App Service.

The app requires custom claims to be returned from Microsoft Entra ID for user authorization. The claims must be removed when the app registration is removed.

You need to include the custom claims in the user access token.

What should you do?
  1. A
    Require the https://graph.microsoft.com/.default scope during authentication.
  2. B
    Configure the app to use the OAuth 2.0 authorization code flow.
  3. C
    Implement custom middleware to retrieve role information from Azure AD.
  4. D
    Add the groups to the groupMembershipClaims attribute in the app manifest.
  5. E
    Add the roles to the appRoles attribute in the app manifest.

Correct Answer:
B

Question #182
You are developing a microservice to run on Azure Container Apps for a company. External HTTP ingress traffic has been enabled.

The company requires that updates to the microservice must not cause downtime.

You need to deploy an update to the microservices.

What should you do?
  1. A
    Enable single revision mode.
  2. B
    Use multiple environments for each container.
  3. C
    Use a private container registry and single image for all containers.
  4. D
    Use a single environment for all containers.
  5. E
    Enable multiple revision mode.

Correct Answer:
A
Question #183
HOTSPOT
-

A company uses Azure Container Apps. A container app named App1 resides in a resource group named RG1.

The company requires testing of updates to App1.

You enable multiple revision modes on App1.

You need to ensure traffic is routed to each revision of App1.

How should you complete the code segment?

NOTE: Each correct selection is worth one point.


    Correct Answer:

    Question #184
    Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

    After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

    You deploy an Azure Container Apps app and disable ingress on the container app.

    Users report that they are unable to access the container app. You investigate and observe that the app has scaled to 0 instances.

    You need to resolve the issue with the container app.

    Solution: Enable ingress, create an HTTP scale rule, and apply the rule to the container app.

    Does the solution meet the goal?
    1. A
      Yes
    2. B
      No
    Correct Answer:
    A
    Question #185

    Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

    After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

    You deploy an Azure Container Apps app and disable ingress on the container app.

    Users report that they are unable to access the container app. You investigate and observe that the app has scaled to 0 instances.

    You need to resolve the issue with the container app.

    Solution: Enable ingress, create a custom scale rule, and apply the rule to the container app.

    Does the solution meet the goal?
    1. A
      Yes
    2. B
      No

    Correct Answer:
    B
    Question #186
    Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

    After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

    You deploy an Azure Container Apps app and disable ingress on the container app.

    Users report that they are unable to access the container app. You investigate and observe that the app has scaled to 0 instances.

    You need to resolve the issue with the container app.

    Solution: Enable ingress and configure the minimum replicas to 1 for the container app.

    Does the solution meet the goal?
    1. A
      Yes
    2. B
      No

    Correct Answer:
    B
    Question #187
    HOTSPOT
    -


    Case study
    -

    This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

    To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

    At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.


    To start the case study
    -
    To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Question button to return to the question.


    Background
    -

    Munson’s Pickles and Preserves Farm is an agricultural cooperative corporation based in Washington, US, with farms located across the United States. The company supports agricultural production resources by distributing seeds fertilizers, chemicals, fuel, and farm machinery to the farms.


    Current Environment
    -

    The company is migrating all applications from an on-premises datacenter to Microsoft Azure. Applications support distributors, farmers, and internal company staff.


    Corporate website
    -
    • The company hosts a public website located at http://www.munsonspicklesandpreservesfarm.com. The site supports farmers and distributors who request agricultural production resources.


    Farms
    -
    • The company created a new customer tenant in the Microsoft Entra admin center to support authentication and authorization for applications.


    Distributors
    -
    • Distributors integrate their applications with data that is accessible by using APIs hosted at http://www.munsonspicklesandpreservesfarm.com/api to receive and update resource data.


    Requirements
    -

    The application components must meet the following requirements:


    Corporate website
    -
    • The site must be migrated to Azure App Service.
    • Costs must be minimized when hosting in Azure.
    • Applications must automatically scale independent of the compute resources.
    • All code changes must be validated by internal staff before release to production.
    • File transfer speeds must improve, and webpage-load performance must increase.
    • All site settings must be centrally stored, secured without using secrets, and encrypted at rest and in transit.
    • A queue-based load leveling pattern must be implemented by using Azure Service Bus queues to support high volumes of website agricultural production resource requests.


    Farms
    -
    • Farmers must authenticate to applications by using Microsoft Entra ID.


    Distributors
    -
    • The company must track a custom telemetry value with each API call and monitor performance of all APIs.
    • API telemetry values must be charted to evaluate variations and trends for resource data.


    Internal staff
    -
    • App and API updates must be validated before release to production.
    • Staff must be able to select a link to direct them back to the production app when validating an app or API update.
    • Staff profile photos and email must be displayed on the website once they authenticate to applications by using their Microsoft Entra ID.


    Security
    -
    • All web communications must be secured by using TLS/HTTPS.
    • Web content must be restricted by country/region to support corporate compliance standards.
    • The principle of least privilege must be applied when providing any user rights or process access rights.
    • Managed identities for Azure resources must be used to authenticate services that support Microsoft Entra ID authentication.


    Issues
    -


    Corporate website
    -
    • Farmers report HTTP 503 errors at the same time as internal staff report that CPU and memory usage are high.
    • Distributors report HTTP 502 errors at the same time as internal staff report that average response times and networking traffic are high.
    • Internal staff report webpage load sizes are large and take a long time to load.
    • Developers receive authentication errors to Service Bus when they debug locally.


    Distributors
    -
    • Many API telemetry values are sent in a short period of time. Telemetry traffic, data costs, and storage costs must be reduced while preserving a statistically correct analysis of the data points sent by the APIs.


    You need to configure App Service to support the corporate website migration.

    Which configuration should you use? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.


      Correct Answer:
      Question #188
      DRAG DROP
      -

      You are developing a web service that will run on Azure virtual machines that use Azure Storage. You configure all virtual machines to use managed identities.

      You have the following requirements:

      • Secret-based authentication mechanisms are not permitted for accessing an Azure Storage account.
      • Must use only Azure Instance Metadata Service endpoints.

      You need to write code to retrieve an access token to access Azure Storage. To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once or not at all. You may need to drag the split bar between panes or scroll to view content.

      NOTE: Each correct selection is worth one point.


        Correct Answer:
        Question #189
        HOTSPOT
        -

        You are developing an Azure Function app.

        The Azure Function app must enable a WebHook to read an image from Azure Blob Storage and create a new Azure Cosmos DB document.

        You need to implement the Azure Function app.

        Which configuration should you use? To answer, select the appropriate options in the answer area.

        NOTE: Each correct selection is worth one point.


          Correct Answer:
          Question #190

          You create an Azure Cosmos DB for NoSQL database.

          You plan to use the Azure Cosmos DB .NET SDK v3 API for NoSQL to upload the following files:



          You receive the following error message when uploading the files: “413 Entity too large”.

          You need to determine which files you can upload to the Azure Cosmos DB for NoSQL database.

          Which files can you upload?
          1. A
            File1, File2, File3, File4, and File5
          2. B
            File1 and File2 only
          3. C
            File1, File2, and File3 only
          4. D
            File1, File2, File3, and File4 only
          5. E
            File1 only

          Correct Answer:
          B

          Question #191
          A development team is creating a new REST API. The API will store data in Azure Blob storage. You plan to deploy the API to Azure App Service.
          Developers must access the Azure Blob storage account to develop the API for the next two months. The Azure Blob storage account must not be accessible by the developers after the two-month time period.
          You need to grant developers access to the Azure Blob storage account.
          What should you do?
          1. A
            Generate a shared access signature (SAS) for the Azure Blob storage account and provide the SAS to all developers.
          2. B
            Create and apply a new lifecycle management policy to include a last accessed date value. Apply the policy to the Azure Blob storage account.
          3. C
            Provide all developers with the access key for the Azure Blob storage account. Update the API to include the Coordinated Universal Time (UTC) timestamp for the request header.
          4. D
            Grant all developers access to the Azure Blob storage account by assigning role-based access control (RBAC) roles.

          Correct Answer:
          A

          Reference:
          https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview

          Question #192
          DRAG DROP -
          You develop a web application.
          You need to register the application with an active Azure Active Directory (Azure AD) tenant.
          Which three actions should you perform in sequence? To answer, move all actions from the list of actions to the answer area and arrange them in the correct order.
          Select and Place:


            Correct Answer:

            Register a new application using the Azure portal
            1. Sign in to the Azure portal using either a work or school account or a personal Microsoft account.
            2. If your account gives you access to more than one tenant, select your account in the upper right corner. Set your portal session to the Azure AD tenant that you want.
            3. Search for and select Azure Active Directory. Under Manage, select App registrations.
            4. Select New registration. (Step 1)
            5. In Register an application, enter a meaningful application name to display to users.
            6. Specify who can use the application. Select the Azure AD instance. (Step 2)
            7. Under Redirect URI (optional), select the type of app you're building: Web or Public client (mobile & desktop). Then enter the redirect URI, or reply URL, for your application. (Step 3)
            8. When finished, select Register.

            Question #193
            You have a new Azure subscription. You are developing an internal website for employees to view sensitive data. The website uses Azure Active Directory (Azure
            AD) for authentication.
            You need to implement multifactor authentication for the website.
            Which two actions should you perform? Each correct answer presents part of the solution.
            NOTE: Each correct selection is worth one point.
            1. A
              Configure the website to use Azure AD B2C.
            2. B
              In Azure AD, create a new conditional access policy.
            3. C
              Upgrade to Azure AD Premium.
            4. D
              In Azure AD, enable application proxy.
            5. E
              In Azure AD conditional access, enable the baseline policy.

            Correct Answer:
            BC
            B: MFA Enabled by conditional access policy. It is the most flexible means to enable two-step verification for your users. Enabling using conditional access policy only works for Azure MFA in the cloud and is a premium feature of Azure AD.
            C: Multi-Factor Authentication comes as part of the following offerings:
            ✑ Azure Active Directory Premium licenses - Full featured use of Azure Multi-Factor Authentication Service (Cloud) or Azure Multi-Factor Authentication Server
            (On-premises).
            ✑ Multi-Factor Authentication for Office 365
            ✑ Azure Active Directory Global Administrators
            Reference:
            https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-getstarted
            Question #194
            DRAG DROP -
            An organization plans to deploy Azure storage services.
            You need to configure shared access signature (SAS) for granting access to Azure Storage.
            Which SAS types should you use? To answer, drag the appropriate SAS types to the correct requirements. Each SAS type may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
            NOTE: Each correct selection is worth one point.
            Select and Place:


              Correct Answer:

              Reference:
              https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
              Question #195
              HOTSPOT -
              You are developing an ASP.NET Core app that includes feature flags which are managed by Azure App Configuration. You create an Azure App Configuration store named AppFeatureflagStore as shown in the exhibit:

              You must be able to use the feature in the app by using the following markup:

              You need to update the app to use the feature flag.
              Which values should you use? To answer, select the appropriate options in the answer area.
              NOTE: Each correct selection is worth one point.
              Hot Area:


                Correct Answer:

                Box 1: FeatureGate -
                You can use the FeatureGate attribute to control whether a whole controller class or a specific action is enabled.

                Box 2: AddAzureAppConfiguration -
                The extension method AddAzureAppConfiguration is used to add the Azure App Configuration Provider.
                Box 3: https://appfeatureflagstore.azconfig.io
                You need to request the access token with resource=https://<yourstorename>.azconfig.io
                Reference:
                https://docs.microsoft.com/en-us/azure/azure-app-configuration/use-feature-flags-dotnet-core https://csharp.christiannagel.com/2020/05/19/azureappconfiguration/ https://stackoverflow.com/questions/61899063/how-to-use-azure-app-configuration-rest-api
                Question #196

                HOTSPOT -
                You have a single page application (SPA) web application that manages information based on data returned by Microsoft Graph from another company's Azure
                Active Directory (Azure AD) instance.
                Users must be able to authenticate and access Microsoft Graph by using their own company's Azure AD instance.
                You need to configure the application manifest for the app registration.
                How should you complete the manifest? To answer, select the appropriate options in the answer area.
                NOTE: Each correct selection is worth one point.
                Hot Area:


                  Correct Answer:

                  Box 1: true -
                  The oauth2AllowImplicitFlow attribute Specifies whether this web app can request OAuth2.0 implicit flow access tokens. The default is false. This flag is used for browser-based apps, like JavaScript single-page apps.
                  In implicit flow, the app receives tokens directly from the Azure Active Directory (Azure AD) authorize endpoint, without any server-to-server exchange. All authentication logic and session handling is done entirely in the JavaScript client with either a page redirect or a pop-up box.

                  Box 2: requiredResourceAccess -
                  With dynamic consent, requiredResourceAccess drives the admin consent experience and the user consent experience for users who are using static consent.
                  However, this parameter doesn't drive the user consent experience for the general case. resourceAppId is the unique identifier for the resource that the app requires access to. This value should be equal to the appId declared on the target resource app. resourceAccess is an array that lists the OAuth2.0 permission scopes and app roles that the app requires from the specified resource. Contains the id and type values of the specified resources.
                  Example:
                  "requiredResourceAccess": [
                  {
                  "resourceAppId": "00000002-0000-0000-c000-000000000000",
                  "resourceAccess": [
                  {
                  "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6",
                  "type": "Scope"
                  }
                  ]
                  }
                  ],
                  Incorrect Answers:
                  ✑ The legacy attribute availableToOtherTenants is no longer supported.
                  ✑ The addIns attribute defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its "FileHandler" functionality. This parameter will let services like Microsoft 365 call the application in the context of a document the user is working on.
                  Example:
                  "addIns": [
                  {
                  "id": "968A844F-7A47-430C-9163-07AE7C31D407",
                  "type":" FileHandler",
                  "properties": [
                  {
                  "key": "version",
                  "value": "2"
                  }
                  ]
                  }
                  ],

                  Box 3: AzureADMyOrg -
                  The signInAudience attribute specifies what Microsoft accounts are supported for the current application. Supported values are:
                  ✑ AzureADMyOrg - Users with a Microsoft work or school account in my organization's Azure AD tenant (for example, single tenant)
                  ✑ AzureADMultipleOrgs - Users with a Microsoft work or school account in any organization's Azure AD tenant (for example, multi-tenant)
                  ✑ AzureADandPersonalMicrosoftAccount - Users with a personal Microsoft account, or a work or school account in any organization's Azure AD tenant
                  Reference:
                  https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-app-manifest https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow
                  Question #197

                  You manage a data processing application that receives requests from an Azure Storage queue.
                  You need to manage access to the queue. You have the following requirements:
                  ✑ Provide other applications access to the Azure queue.
                  ✑ Ensure that you can revoke access to the queue without having to regenerate the storage account keys.
                  ✑ Specify access at the queue level and not at the storage account level.
                  Which type of shared access signature (SAS) should you use?
                  1. A
                    Service SAS with a stored access policy
                  2. B
                    Account SAS
                  3. C
                    User Delegation SAS
                  4. D
                    Service SAS with ad hoc SAS

                  Correct Answer:
                  A
                  A service SAS is secured with the storage account key. A service SAS delegates access to a resource in only one of the Azure Storage services: Blob storage,
                  Queue storage, Table storage, or Azure Files.
                  Stored access policies give you the option to revoke permissions for a service SAS without having to regenerate the storage account keys.
                  Incorrect Answers:
                  Account SAS: Account SAS is specified at the account level. It is secured with the storage account key.
                  User Delegation SAS: A user delegation SAS applies to Blob storage only.
                  Reference:
                  https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
                  Question #198
                  HOTSPOT -
                  You are developing an application to store and retrieve data in Azure Blob storage. The application will be hosted in an on-premises virtual machine (VM). The
                  VM is connected to Azure by using a Site-to-Site VPN gateway connection. The application is secured by using Azure Active Directory (Azure AD) credentials.
                  The application must be granted access to the Azure Blob storage account with a start time, expiry time, and read permissions. The Azure Blob storage account access must use the Azure AD credentials of the application to secure data access. Data access must be able to be revoked if the client application security is breached.
                  You need to secure the application access to Azure Blob storage.
                  Which security features should you use? To answer select the appropriate options in the answer area.
                  NOTE: Each correct selection is worth one point.
                  Hot Area:


                    Correct Answer:

                    Box 1: Shared access signature (SAS) token
                    When your application design requires shared access signatures for access to Blob storage, use Azure AD credentials to create a user delegation SAS when possible for superior security.

                    Box 2: Stored access policy -
                    Stored access policies give you the option to revoke permissions for a service SAS without having to regenerate the storage account keys.
                    A shared access signature can take one of the following two forms:
                    ✑ Service SAS with stored access policy. A stored access policy is defined on a resource container, which can be a blob container, table, queue, or file share.
                    The stored access policy can be used to manage constraints for one or more service shared access signatures. When you associate a service SAS with a stored access policy, the SAS inherits the constraints ×’€" the start time, expiry time, and permissions ×’€" defined for the stored access policy.
                    ✑ Ad hoc SAS.
                    Reference:
                    https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview

                    Question #199
                    You are building a web application that uses the Microsoft identity platform for user authentication.
                    You are implementing user identification for the web application.
                    You need to retrieve a claim to uniquely identify a user.
                    Which claim type should you use?
                    1. A
                      aud
                    2. B
                      nonce
                    3. C
                      oid
                    4. D
                      idp

                    Correct Answer:
                    C
                    oid -The object identifier for the user in Azure AD. This value is the immutable and non-reusable identifier of the user. Use this value, not email, as a unique identifier for users; email addresses can change. If you use the Azure AD Graph API in your app, object ID is that value used to query profile information.
                    Incorrect:
                    Not A: aud - Who the token was issued for. This will be the application's client ID.
                    Reference:
                    https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/claims
                    Question #200
                    You are developing an Azure Function that calls external APIs by providing an access token for the API. The access token is stored in a secret named token in an
                    Azure Key Vault named mykeyvault.
                    You need to ensure the Azure Function can access to the token. Which value should you store in the Azure Function App configuration?
                    1. A
                      KeyVault:mykeyvault;Secret:token
                    2. B
                      App:Settings:Secret:mykeyvault:token
                    3. C
                      AZUREKVCONNSTR_ https://mykeyveult.vault.ezure.net/secrets/token/
                    4. D
                      @Microsoft.KeyVault(SecretUri=https://mykeyvault.vault.azure.net/secrets/token/)

                    Correct Answer:
                    D
                    Add Key Vault secrets reference in the Function App configuration.
                    Syntax: @Microsoft.KeyVault(SecretUri={copied identifier for the username secret})
                    Reference:
                    https://daniel-krzyczkowski.github.io/Integrate-Key-Vault-Secrets-With-Azure-Functions/

                    Question #201
                    A company maintains multiple web and mobile applications. Each application uses custom in-house identity providers as well as social identity providers.
                    You need to implement single sign-on (SSO) for all the applications.
                    What should you do?
                    1. A
                      Use Azure Active Directory B2C (Azure AD B2C) with custom policies.
                    2. B
                      Use Azure Active Directory B2B (Azure AD B2B) and enable external collaboration.
                    3. C
                      Use Azure Active Directory B2C (Azure AD B2C) with user flows.
                    4. D
                      Use Azure Active Directory B2B (Azure AD B2B).

                    Correct Answer:
                    B
                    You can add Google as an identity provider for B2B guest users.
                    Federation with SAML/WS-Fed identity providers for guest users.
                    Make sure your organization's external collaboration settings are configured such that you're allowed to invite guests.
                    Note 1: As a user who is assigned any of the limited administrator directory roles, you can use the Azure portal to invite B2B collaboration users. You can invite guest users to the directory, to a group, or to an application. After you invite a user through any of these methods, the invited user's account is added to Azure
                    Active Directory (Azure AD), with a user type of Guest.
                    Note 2: Direct federation in Azure Active Directory is now referred to as SAML/WS-Fed identity provider (IdP) federation.
                    Reference:
                    https://docs.microsoft.com/en-us/azure/active-directory/external-identities/google-federation https://docs.microsoft.com/en-us/azure/active-directory/external-identities/add-users-administrator

                    Question #202
                    You develop a Python application for image rendering that uses GPU resources to optimize rendering processes. You deploy the application to an Azure
                    Container Instances (ACI) Linux container.
                    The application requires a secret value to be passed when the container is started. The value must only be accessed from within the container.
                    You need to pass the secret value.
                    What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
                    NOTE: Each correct selection is worth one point.
                    1. A
                      Create an environment variable Set the secureValue property to the secret value.
                    2. B
                      Add the secret value to the container image. Use a managed identity.
                    3. C
                      Add the secret value to the application code Set the container startup command.
                    4. D
                      Add the secret value to an Azure Blob storage account. Generate a SAS token.
                    5. E
                      Mount a secret volume containing the secret value in a secrets file.

                    Correct Answer:
                    AE
                    A: Secure environment variables -
                    Another method (another than a secret volume) for providing sensitive information to containers (including Windows containers) is through the use of secure environment variables.
                    E: Use a secret volume to supply sensitive information to the containers in a container group. The secret volume stores your secrets in files within the volume, accessible by the containers in the container group. By storing secrets in a secret volume, you can avoid adding sensitive data like SSH keys or database credentials to your application code.
                    Reference:
                    https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-secret

                    Question #203
                    You are developing a user portal for a company.
                    You need to create a report for the portal that lists information about employees who are subject matter experts for a specific topic. You must ensure that administrators have full control and consent over the data.
                    Which technology should you use?
                    1. A
                      Microsoft Graph data connect
                    2. B
                      Microsoft Graph API
                    3. C
                      Microsoft Graph connectors

                    Correct Answer:
                    A
                    Data Connect grants a more granular control and consent model: you can manage data, see who is accessing it, and request specific properties of an entity. This enhances the Microsoft Graph model, which grants or denies applications access to entire entities.
                    Microsoft Graph Data Connect augments Microsoft Graph's transactional model with an intelligent way to access rich data at scale. The data covers how workers communicate, collaborate, and manage their time across all the applications and services in Microsoft 365.
                    Incorrect:
                    Not B: The Microsoft Graph API is a RESTful web API that enables you to access Microsoft Cloud service resources. After you register your app and get authentication tokens for a user or service, you can make requests to the Microsoft Graph API.
                    A simplistic definition of a Graph API is an API that models the data in terms of nodes and edges (objects and relationships) and allows the client to interact with multiple nodes in a single request.
                    Not C: Microsoft Graph connectors, your organization can index third-party data so that it appears in Microsoft Search results.
                    With Microsoft Graph connectors, your organization can index third-party data so that it appears in Microsoft Search results.
                    Reference:
                    https://docs.microsoft.com/en-us/graph/data-connect-concept-overview

                    Question #204
                    HOTSPOT -
                    You are a developer building a web site using a web app. The web site stores configuration data in Azure App Configuration.
                    Access to Azure App Configuration has been configured to use the identity of the web app for authentication. Security requirements specify that no other authentication systems must be used.
                    You need to load configuration data from Azure App Configuration.
                    How should you complete the code? To answer, select the appropriate options in the answer area.
                    NOTE: Each correct selection is worth one point.
                    Hot Area:


                      Correct Answer:

                      Box 1: AddAzureAppConfiguration -
                      Load data from App Configuration, code example:
                      public static IHostBuilder CreateHostBuilder(string[] args) =>
                      Host.CreateDefaultBuilder(args)
                      .ConfigureWebHostDefaults(webBuilder =>
                      webBuilder.ConfigureAppConfiguration((hostingContext, config) =>
                      {
                      var settings = config.Build();
                      config.AddAzureAppConfiguration(options =>
                      {
                      Etc.
                      Box 2: ManagedIdentityCredential
                      Use managed identities to access App Configuration
                      If you want to use a user-assigned managed identity, be sure to specify the clientId when creating the ManagedIdentityCredential. config.AddAzureAppConfiguration(options =>
                      {
                      options.Connect(new Uri(settings["AppConfig:Endpoint"]), new ManagedIdentityCredential("<your_clientId>"))
                      });
                      Full code sample:
                      public static IHostBuilder CreateHostBuilder(string[] args) =>
                      Host.CreateDefaultBuilder(args)
                      .ConfigureWebHostDefaults(webBuilder =>
                      webBuilder.ConfigureAppConfiguration((hostingContext, config) =>
                      {
                      var settings = config.Build();
                      config.AddAzureAppConfiguration(options =>
                      options.Connect(new Uri(settings["AppConfig:Endpoint"]), new ManagedIdentityCredential()));
                      })
                      .UseStartup<Startup>());
                      Reference:
                      https://docs.microsoft.com/en-us/azure/azure-app-configuration/howto-integrate-azure-managed-service-identity?tabs=core5x&pivots=framework- dotnet
                      Question #205
                      HOTSPOT -
                      You are building an application that stores sensitive customer data in Azure Blob storage. The data must be encrypted with a key that is unique for each customer.
                      If the encryption key has been corrupted it must not be used for encryption.
                      You need to ensure that the blob is encrypted.
                      How should you complete the code segment? To answer, select the appropriate options in the answer area.
                      NOTE: Each correct selection is worth one point.
                      Hot Area:


                        Correct Answer:

                        Box 1: CustomerProvidedKey(key)
                        The data must be encrypted with a key that is unique for each customer.
                        Sample code:
                        async static Task UploadBlobWithClientKey(Uri blobUri,
                        Stream data,
                        byte[] key,
                        string keySha256)
                        {
                        // Create a new customer-provided key.
                        // Key must be AES-256.
                        var cpk = new CustomerProvidedKey(key);

                        Box 2: Encryption -
                        CustomerProvidedKey.EncryptionKey Property
                        Sample code continued:
                        // Check the key's encryption hash.
                        if (cpk.EncryptionKeyHash != keySha256)
                        {
                        throw new InvalidOperationException("The encryption key is corrupted.");
                        }

                        Box 3: CustomerProvidedKey -
                        Sample code continued;
                        // Specify the customer-provided key on the options for the client.
                        BlobClientOptions options = new BlobClientOptions()
                        {

                        CustomerProvidedKey = cpk -
                        };
                        // Create the client object with options specified.
                        BlobClient blobClient = new BlobClient(
                        blobUri,
                        new DefaultAzureCredential(),
                        options);
                        Incorrect:
                        * Version - Gets the BlobClientOptions.ServiceVersion of the service API used when making requests.
                        Transport - The HttpPipelineTransport to be used for this client.
                        Reference:
                        https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-customer-provided-key

                        Question #206
                        DRAG DROP -
                        You develop a web app that uses the tier D1 app service plan by using the Web Apps feature of Microsoft Azure App Service.
                        Spikes in traffic have caused increases in page load times.
                        You need to ensure that the web app automatically scales when CPU load is about 85 percent and minimize costs.
                        Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
                        NOTE: More than one order of answer choices is correct. You will receive credit for any of the correct orders you select.
                        Select and Place:


                          Correct Answer:

                          Step 1: Configure the web app to the Standard App Service Tier
                          The Standard tier supports auto-scaling, and we should minimize the cost.
                          Step 2: Enable autoscaling on the web app

                          First enable autoscale -

                          Step 3: Add a scale rule -

                          Step 4: Add a Scale condition -
                          Reference:
                          https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-autoscale-get-started

                          Question #207
                          Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets the stated goals.
                          You are developing and deploying several ASP.NET web applications to Azure App Service. You plan to save session state information and HTML output.
                          You must use a storage mechanism with the following requirements:
                          ✑ Share session state across all ASP.NET web applications.
                          ✑ Support controlled, concurrent access to the same session state data for multiple readers and a single writer.
                          ✑ Save full HTTP responses for concurrent requests.
                          You need to store the information.
                          Proposed Solution: Enable Application Request Routing (ARR).
                          Does the solution meet the goal?
                          1. A
                            Yes
                          2. B
                            No

                          Correct Answer:
                          B
                          Instead deploy and configure Azure Cache for Redis. Update the web applications.
                          Reference:
                          https://docs.microsoft.com/en-us/azure/architecture/best-practices/caching#managing-concurrency-in-a-cache
                          Question #208
                          Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets the stated goals.
                          You are developing and deploying several ASP.NET web applications to Azure App Service. You plan to save session state information and HTML output.
                          You must use a storage mechanism with the following requirements:
                          ✑ Share session state across all ASP.NET web applications.
                          ✑ Support controlled, concurrent access to the same session state data for multiple readers and a single writer.
                          ✑ Save full HTTP responses for concurrent requests.
                          You need to store the information.
                          Proposed Solution: Deploy and configure an Azure Database for PostgreSQL. Update the web applications.
                          Does the solution meet the goal?
                          1. A
                            Yes
                          2. B
                            No
                          Correct Answer:
                          B
                          Instead deploy and configure Azure Cache for Redis. Update the web applications.
                          Reference:
                          https://docs.microsoft.com/en-us/azure/architecture/best-practices/caching#managing-concurrency-in-a-cache
                          Question #209
                          HOTSPOT -
                          A company is developing a gaming platform. Users can join teams to play online and see leaderboards that include player statistics. The solution includes an entity named Team.
                          You plan to implement an Azure Redis Cache instance to improve the efficiency of data operations for entities that rarely change.
                          You need to invalidate the cache when team data is changed.
                          How should you complete the code? To answer, select the appropriate options in the answer area.
                          NOTE: Each correct selection is worth one point.
                          Hot Area:


                            Correct Answer:

                            Box 1: IDatabase cache = connection.GetDatabase();
                            Connection refers to a previously configured ConnectionMultiplexer.
                            Box 2: cache.StringSet("teams",")
                            To specify the expiration of an item in the cache, use the TimeSpan parameter of StringSet. cache.StringSet("key1", "value1", TimeSpan.FromMinutes(90));
                            Reference:
                            https://azure.microsoft.com/sv-se/blog/lap-around-azure-redis-cache-preview/ https://docs.microsoft.com/en-us/cli/azure/webapp/config/container
                            Question #210
                            DRAG DROP -
                            A company has multiple warehouses. Each warehouse contains IoT temperature devices which deliver temperature data to an Azure Service Bus queue.
                            You need to send email alerts to facility supervisors immediately if the temperature at a warehouse goes above or below specified threshold temperatures.
                            Which five actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
                            Select and Place:


                              Correct Answer:

                              Step 1: Create a blank Logic app.
                              Create and configure a Logic App.
                              Step 2: Add a logical app trigger that fires when one or more messages arrive in the queue.
                              Configure the logic app trigger.
                              Under Triggers, select When one or more messages arrive in a queue (auto-complete).
                              Step 3: Add an action that reads IoT temperature data from the Service Bus queue
                              Step 4: Add a condition that compares the temperature against the upper and lower thresholds.
                              Step 5: Add an action that sends an email to specified personnel if the temperature is outside of those thresholds
                              Reference:
                              https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitoring-notifications-with-azure-logic-apps


                              No comments:

                              Post a Comment