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/
You have a third-party API that is secured by using Azure Active Directory (Azure AD).
You need to configure a SharePoint Framework (SPFx) web part to consume the third-party API.
Which method should you use?
Answer:
A
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.
To consume any REST API using the AadHttpClient client object, create a new instance of the AadHttpClient type by calling the context.aadHttpClientFactory.getClient() method and providing the URI of the target service.
Reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aad-tutorial
This question requires that you evaluate the underlined text to determine if it is correct.
You can use a Command Set extension to develop a breadcrumb element that will appear on every SharePoint Online page.
Instructions: Review the underlined text. If it makes the statement correct, select `No change is needed`. If the statement is incorrect, select the answer choice that makes the statement correct.
Answer:
B
Application Customizers provide access to well-known locations on SharePoint pages that you can modify based on your business and functional requirements.
For example, you can create dynamic header and footer experiences that render across all the pages in SharePoint Online.
Reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions
You need to request permission to create a group in a SharePoint Framework (SPFx) solution.
To which JSON file should you add the permission request?
Answer:
A
Reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis
You have a SharePoint Framework (SPFx) web part that displays the weather. Users can set the city within the web part.
Which component is invoked to provide the users with the ability to configure the settings for the web part?
Answer:
B
Reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/integrate-web-part-properties-with-sharepoint
HOTSPOT -
You are developing a SharePoint Framework (SPFx) solution.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:
Answer:
Reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer#enhance-the-field-customizer-rendering https://www.spguides.com/spfx-application-customizer/
You are developing a front end web app.
You want to display the current username as part of the user interface.
You need to retrieve the current username from Microsoft Graph by using a REST request. The solution must minimize the amount of information returned.
To which URI should you send the request?
Answer:
D
Reference:
https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http
What is the default permission scope when you request an access token by using MSGraphClient?
Answer:
D
By default, the service principal has no explicit permissions granted to access the Microsoft Graph. However, if you request an access token for the Microsoft
Graph, you get a token with the user_impersonation permission scope that can be used for reading information about the users (that is, User.Read.All).
Reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-overview