Building Applications and Solutions with Microsoft 365 Core Services v1.0 (MS-600)

Page:    1 / 17   
Total 245 questions

HOTSPOT -
You have a Microsoft 365 tenant that contains a user named User1 and a group named Group1.
You need to create a Microsoft Graph API query that returns the following information:
✑ All the calendar events of User1
✑ The details of Group1
The solution must meet the following requirements:
✑ Minimize the amount of data returned.
✑ Minimize the number of calls executed against the Microsoft Graph API.
How should you complete the query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:



Answer :

Box 1: /me/calendars/events?..
"graph/Microsoft/com" "calendar/events?"
Example: A user's calendar in the default calendarGroup.

POST /me/calendars/{id}/events -
POST /users/{id | userPrincipalName}/calendars/{id}/events
Box 2: events?select..
Box 3: "/groups?filterג€¦'Group1')"
Use a filter to see only Group1.
Reference:
https://docs.microsoft.com/en-us/graph/api/calendar-post-events?view=graph-rest-1.0&tabs=http

HOTSPOT -
You are creating a report that will query Azure Active Directory (Azure AD) for group information by using the Microsoft Graph API.
You need to retrieve an ordered list of groups by title. The solution must minimize the amount of data returned in the response.
How should you complete the Graph API call? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:



Answer :

Box 1: $select=..
Example:
GET https://graph.microsoft.com/v1.0/groups/{id}?$select=displayName
Header: Authorization:Bearer {access_token}

Box 2: &$orderBy=Displayname -
Order by title.
Reference:
https://stackify.dev/185172-how-to-get-users-group-name-from-azure-active-directory-in-angular

HOTSPOT -
You have a Microsoft 365 tenant that contains a group named Group1. Group1 is configured as shown in the following table.

You need to create a Microsoft Teams team for Group1. The team must contain two channels named Events and Projects.
How should you complete the Microsoft Graph API operation? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:



Answer :

Box 1: POST -
Example, create a team from group:
POST https://graph.microsoft.com/v1.0/teams

Content-Type: application/json -
{
"[email protected]": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"[email protected]": "https://graph.microsoft.com/v1.0/groups('71392b2f-1765-406e-86af-5907d9bdb2ab')"
}
Box 2: "[email protected]": "https://graph.microsoft.com/v1.0/groups..
Reference:
https://docs.microsoft.com/en-us/graph/api/team-post

You need to build a SharePoint Framework (SPFx) web part that will display the contents of a user's Microsoft Exchange Online inbox. The solution must minimize development effort.
Which object should you include in the solution?

  • A. SPHttpClient
  • B. the JavaScript API for Exchange Web Services (EWS)
  • C. MSGraphClient
  • D. AadHttpClient


Answer : C

MSGraphClient is a new HTTP client introduced in SharePoint Framework v1.6.0 that simplifies connecting to the Microsoft Graph inside SharePoint Framework solutions.
With MS Graph we use MSGraphClient to get information about the current user; this.context.msGraphClientFactory
.getClient()
.then((client: MSGraphClient): void => {
// get information about the current user from the Microsoft Graph client
.api('/me')
.get((error, response: any, rawResponse?: any) => {
// handle the response
});
});
Reference:
https://www.c-sharpcorner.com/article/show-outlook-messages-from-microsoft-graph-in-spfx-client-side-web-part/

You are developing a mobile application that will display the current signed-in user's display name and the application settings. The application settings are stored as a Microsoft Graph extension of the user profile.
Users of the application have intermittent network connectivity.
You need to retrieve the least amount of data by using a single REST request. The solution must minimize network traffic.
Which URI should you use to retrieve the data?

  • A. https://graph.microsoft.com/v1.0/me?$select=displayName,userType&$expand=extensions
  • B. https://graph.microsoft.com/v1.0/me
  • C. https://graph.microsoft.com/v1.0/me?$select=displayName,id&$expand=extensions
  • D. https://graph.microsoft.com/v1.0/me?$expand=extensions


Answer : C

For the event, group event, group post, message, personal contact, task, task list resource types, you can use the same REST request as getting the resource instance, look for an extension that matches a filter on its id property, and expand the instance with the extension. The response includes most of the resource properties.
Example: GET /users/{Id|userPrincipalName}/events/{Id}/extensions/{extensionId}
Reference:
https://docs.microsoft.com/en-us/graph/api/opentypeextension-get

DRAG DROP -
You are developing an application that will upload files that are larger than 50 MB to Microsoft OneDrive.
You need to recommend an upload solution to ensure that the file upload process can resume if a network error occurs during the upload.
Which four actions should you perform in sequence? To answer, move the actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:



Answer :

Step 1: Create an upload session that gets the uploadUrl value
To upload a file using an upload session, there are two steps:
1. Create an upload session
2. Upload bytes to the upload session
Step 2: Upload the first sequence of bytes.
To upload the file, or a portion of the file, your app makes a PUT request to the uploadUrl value received in the createUploadSession response.
Step 3: Use the nextExpectedRanges field to continue the upload process.
Your app can use the nextExpectedRanges value to determine where to start the next byte range.
Step 4: Send the final byte sequence
When the last byte range of a file is received the server will response with an HTTP 201 Created or HTTP 200 OK. The response body will also include the default property set for the driveItem representing the completed file.
Once the last byte of the file has been uploaded the upload session is completed and the final file is shown in the destination folder.
Example:
PUT https://sn3302.up.1drv.com/up/fe6987415ace7X4e1eF866337

Content-Length: 21 -
Content-Range: bytes 101-127/128
<final bytes of the file>
Reference:
https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession

You need to display the profile picture of the current signed-in user.
Which REST query should you use to retrieve the picture?

  • A. GET /me/photo/$value
  • B. GET /me/photos/0
  • C. GET /users/{userPrincipalName}/photo
  • D. GET /me/photo


Answer : A

The following OData 4.0 capabilities are URL segments, not query parameters.
$value retrieves or updates the binary value of an item.

Example: GET /me/photo/$value -
Reference:
https://docs.microsoft.com/en-us/graph/query-parameters

You plan to develop a TypeScript client-side app that will use the MSGraphClient library.
You need to configure Microsoft Visual Studio Code to use IntelliSense and support code completion for the MSGraph client library.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Add the following import statement to the code: import * as MicrosoftGraph from ג€˜@microsoft/microsoft-graph-clientג€™;
  • B. Run the npm install @microsoft/microsoft-graph-types --save-dev command.
  • C. Run the npm install @microsoft/microsoft-graph-client --save-dev command.
  • D. Install the Microsoft Graph Toolkit.
  • E. Add the following import statement to the code: import * as MicrosoftGraph from ג€˜@microsoft/microsoft-graph-typesג€™;


Answer : AB

B: Microsoft Graph TypeScript Types
Install types and save in package.json as a development dependency npm install @microsoft/microsoft-graph-types --save-dev
A: The following examples assume that you have a valid access token. The following example uses isomorphic-fetch and Microsoft Graph JavaScript client library
-
import { User } from "@microsoft/microsoft-graph-types-beta"; import { Client } from "@microsoft/microsoft-graph-client"; import 'isomorphic-fetch'; const client = Client.initWithMiddleware({ defaultVersion: 'beta',
...
});
const response = await client.api("/me").get();
const user = response as User;
Reference:
https://github.com/microsoftgraph/msgraph-typescript-typings

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. XMLHttpRequest
  • B. SPHttpClient
  • C. MSGraphClient
  • D. AadHttpClient


Answer : C

Get teams a user is a member of -
The me/joinedTeams Graph endpoint will return the teams for the user. The following code block will allow you to get the data private _getTeams = async (): Promise<ITeam[]> => { let myTeams: ITeam[] = []; try { const teamsResponse = await this.props.graphClient.api('me/joinedTeams').version('v1.0').get(); myTeams = teamsResponse.value as ITeam[];
} catch (error) {
console.log('Error getting teams');
}
return myTeams;
}
Incorrect:
Not D: The MSGraphClient client object provides a more fluent syntax compared to AadHttpClient.
Reference:
https://www.m365-dev.com/2019/03/01/getting-the-teams-a-user-is-a-member-of-via-ms-graph/

DRAG DROP -
You are building an app that will use the Microsoft OneDrive API and enable users to upload 15-MB files to a OneDrive location.
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.
Select and Place:



Answer :

Step 1: Request an access token.
The Authorization header and bearer token should only be sent when issuing the POST during the first step. It should not be included when issuing the PUT.
Step 2: Request a new upload session.

Create an upload session -
To begin a large file upload, your app must first request a new upload session. This creates a temporary storage location where the bytes of the file will be saved until the complete file is uploaded.
Step 3: Upload bytes to the upload session.
Upload bytes to the upload session
To upload the file, or a portion of the file, your app makes a PUT request to the uploadUrl value received in the createUploadSession response. You can upload the entire file, or split the file into multiple byte ranges, as long as the maximum bytes in any given request is less than 60 MiB.
The fragments of the file must be uploaded sequentially in order. Uploading fragments out of order will result in an error.
Reference:
https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online

You have a Microsoft 365 tenant that contains a user named [email protected].
You need to retrieve the name of the manager of the user. The solution must minimize the amount of data returned.
Which Microsoft Graph URI should you use?



Answer : C

List manager -
Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node.

HTTP request -
Get the manager:

HTTP -

GET /me/manager -
GET /users/{id | userPrincipalName}/manager

Optional query parameters -
This method supports the $select and $expand OData query parameters to help customize the response.

Example 1: Get manager -
The following example shows a request to get the manager.

Request -
GET https://graph.microsoft.com/v1.0/users/{id|userPrincipalName}/manager

Response -
The following is an example of the response.
Note: The response object shown here might be shortened for readability.

HTTP -
{
"id": "7d54cb02-aaa3-4016-9f9c-a4b49422dd9b",
"displayName": "Sara Davis",
"jobTitle": "Finance VP",
"mail": "[email protected]",
"userPrincipalName": "[email protected]"
}
Reference:
https://docs.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http

HOTSPOT -
You need to build a daemon application that will be registered in the Microsoft identity platform and use the Microsoft Authentication Library (MSAL). The application will request user data by using the Microsoft Graph API and periodically publish a summary report.
Which authentication flow and identity type should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:



Answer :

Box 1: Client credentials grant -
A .NET Core daemon console application using MSAL.NET to acquire tokens for resources
In these scenarios we show how unattended daemon applications can authenticate as itself using the Microsoft Authentication Library for .NET (MSAL.NET) SDK and acquire Access Tokens for various web APIs like Microsoft Graph or any other API secured with the Microsoft Identity Platform.
Example, Call Graph.
This sample application shows how to use the Microsoft Authentication Library for .NET (MSAL.NET) to access the data of Microsoft business customers in a long-running, non-interactive process. It uses the OAuth 2 client credentials grantto acquire an access token, which can be used to call the Microsoft Graph and access organizational data.



Box 2: Application -
Reference:
https://docs.microsoft.com/en-us/samples/azure-samples/active-directory-dotnetcore-daemon-v2/ms-identity-daemon/

HOTSPOT
-

You have a Microsoft Teams app named App1 that has a custom schema extension used to define a property.

You need to update the custom property for a user by using the Microsoft Graph API.

How should you complete the request? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.



Answer :

HOTSPOT
-

You are developing an app that will use the Microsoft Graph API to retrieve the emails of signed-in users. The app will return the email subject and send date of messages marked as high importance.

Which OData query options should you use to complete the HTTP GET request? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.



Answer :

HOTSPOT
-

You have a Microsoft 365 subscription.

You build a Microsoft Teams app named App1.

You need to publish App1 to the Teams deployment by using the Microsoft Graph API.

How should you complete the request? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.



Answer :

Page:    1 / 17   
Total 245 questions