Does this meet the goal?

Topic 2, Misc. Questions

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 are developing a new application named App1 that uses the Microsoft identity platform to authenticate to Azure Active Directory (Azure AD).

Currently, App1 can read user profile information.

You need to allow App1 to read the user’s calendar.

Solution: Perform a POST request against https://graph.microsoft.eom/v1.0/me/events.

Does this meet the goal?
A . Yes
B. No

Answer: B

Which code segment should you insert at line 06?

You need to complete the MSAL.js code for SSO.

Which code segment should you insert at line 06?
A . storeAuthStateInCookie: false
B. storeAuthStateInCookie: true
C. cacheLocation: ‘localStorage’
D. cacheLocation: ‘sessionStorage’

Answer: C

Explanation:

Scenario: Implement single sign-on (SSO) and minimize login prompts across browser tabs.

When your application is open in multiple tabs and you first sign in the user on one tab, the user is also signed in on the other tabs without being prompted. MSAL.js caches the ID token for the user in the browser localStorage and will sign the user in to the application on the other open tabs.

By default, MSAL.js uses sessionStorage which does not allow the session to be shared between tabs. To get SSO between tabs, make sure to set the cacheLocation in MSAL.js to localStorage.

Reference: https://docs.microsoft.com/bs-latn-ba/Azure/active-directory/develop/msal-js-sso

amount of code?

You are developing a SharePoint Framework (SPFx) web part.

Which API should you use to retrieve the Microsoft Teams memberships of a user by using the minimum

amount of code?
A . MSGraphClient
B. AadHttpClient
C. SPHttpClient
D. XMLHttpRequest

Answer: A

Explanation:

You can use the Microsoft Graph API to work with Microsoft Teams. In Microsoft Graph, Microsoft Teams is represented by a group resource.

If you are targeting Microsoft Graph, you can use the MSGraphClient client object, which provides a more

fluent syntax compared to AadHttpClient.

Note: In versions of the SharePoint Framework starting with v.1.4.1, you can access Microsoft Graph by using either the native graph client (MSGraphClient), or the low-level type used to access any Azure AD-secured REST API (AadHttpClient).

The AadHttpClient client object is useful for consuming any REST API. You can use it to consume Microsoft Graph or any other third-party (or first-party) REST API.

The MSGraphClient client object can consume the Microsoft Graph only. Internally it uses the AadHttpClient client object and supports the fluent syntax of the Microsoft Graph SDK.

References:

https://docs.microsoft.com/en-us/graph/api/resources/teams-api-overview?view=graph-rest-1.0

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aad-tutorial

You are developing a serveries application that reads all the emails in the Inbox of a specific Microsoft 365 mailbox. Some emails contain meeting dates and room mailbox names.

You are developing a serveries application that reads all the emails in the Inbox of a specific Microsoft 365 mailbox. Some emails contain meeting dates and room mailbox names.

The application has the following requirements:

A . Option A
B. Option B
C. Option C
D. Option D

Answer: A

How should you complete the Microsoft Graph API query?

HOTSPOT

You have an app named App1 that uses the Microsoft Graph API.

You need to identify all users who have a job title of Developer. The solution must return only the display name and email address attributes of the users.

How should you complete the Microsoft Graph API query? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Graphical user interface

Description automatically generated

Which task can the web part perform?

You have a SharePoint Framework (SPFx) web part that includes the manifest shown in the following exhibit.

Which task can the web part perform?
A . Send an email on behalf of a mail-enabled group.
B. Send an email as another user.
C. Send an email as the current user.
D. Send an email as the web part.

Answer: C

Explanation:

In SPFx we will get the user context using the object “context”. We have msGraphClientFactory available in the same object which will take care of generating the Access Token based on the user context.

Reference: https://www.c-sharpcorner.com/article/how-to-send-email-using-graph-api-in-sharepoint-framework-spfx/

Which two actions should you perform?

You need to implement the role functionality for the backend web service calls.

Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
A . Upload a certificate for the application registration of the backend web service.
B. Modify the manifest that defines the application roles and set Allowed Member Types to Apps.
C. Modify the manifest that defines the application roles and set Allowed Member Types to Users.
D. Assign the application roles to the Azure AD group that contains the users who are mapped to the roles.
E. Create a new client secret in the application registration of the backed web service.

Answer: B,D

Explanation:

Reference: https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-add-app-roles-in-azure-ad-apps

What should you do before you begin debugging in Visual Studio Code?

You have a custom Microsoft Word add-in that was written by using Microsoft Visual Studio Code.

A user reports that there is an issue with the add-in.

You need to debug the add-in for Word Online.

What should you do before you begin debugging in Visual Studio Code?
A . Disable script debugging in your web browser
B. Sideload the add-in
C. Publish the manifest to the Microsoft SharePoint app catalog
D. Add the manifest path to the trusted catalogs

Answer: C

Explanation:

Debug your add-in from Excel or Word on the web

To debug your add-in by using Office on the web (see step 3):

Which three actions should you perform in sequence?

DRAG DROP

You plan to create a bot as part of a Microsoft Teams app. The bot will use Microsoft 365 services on behalf of a user.

You add token.botframework.com to the list of valid domains in the app manifest.

You need to configure the authentication environment to ensure that the bot can access Microsoft 365 services on behalf of the user.

Which three 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.

Answer:

Explanation:

Graphical user interface, text, application, chat or text message

Description automatically generated

Step 1: Create a Bot Channels Registration in Azure and register the application in Azure Active Directory (Azure AD)

Register a bot by creating a Bot Channels Registration through Azure Bot Channel Registration.

The Azure AD portal provides a central platform for you to register and configure your apps. Your app must be registered in the Azure AD portal to integrate with the identity platform and call Microsoft Graph APIs.

Step 2: Create a new OAuth Connection in the Bot Channels Registration

The first step to getting an access token for many OpenID Connect (OIDC) and OAuth 2.0 flows is to redirect the user to the Microsoft identity platform /authorize endpoint. Azure AD will sign the user in and ensure their consent for the permissions your app requests. In the authorization code grant flow, after consent is obtained, Azure AD will return an authorization_code to your app that it can redeem at the Microsoft identity platform /token endpoint for an access token.

Step 3: Set the reply URL to the web service that hosts the bot.

Fill in the Webhook (for calling) where you will receive incoming notifications. E.g.

https://{your domain}/api/calls.