Question 106 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question 106 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question

DRAG DROP - You are developing an application to retrieve user profile information.

The application will use the Microsoft Graph SDK.

The app must retrieve user profile information by using a Microsoft Graph API call.

You need to call the Microsoft Graph API from the application.

In which order should you perform the actions? To answer, move all actions from the list of actions to the answer area and arrange them in the correct order.

Select and Place:

Actions

Create an authentication provider.

Create a new instance of the GraphServiceClient.

Invoke the request to the Microsoft Graph API

Register the application with the Microsoft identity platform

Build a client by using the client app ID.

Answer Area

©
@

(eo)

Explanations

Actions

Answer Area

©

Register the application with the Microsoft identity platform.

Build a client by using the client app ID.

Create an authentication provider.

‘Create a new instance of the GraphServiceClient.

Invoke the request to the Microsoft Graph API

OO

Step 1: Register the application with the Microsoft identity platform.

To authenticate with the Microsoft identity platform endpoint, you must first register your app at the Azure app registration portal Step 2: Build a client by using the client app ID Step 3: Create an authentication provider Create an authentication provider by passing in a client application and graph scopes.

Code example: DeviceCodeProvider authProvider = new DeviceCodeProvider(publicClientApplication, graphScopes); // Create a new instance of GraphServiceClient with the authentication provider.

GraphServiceClient graphClient = new GraphServiceClient(authProvider); Step 4: Create a new instance of the GraphServiceClient Step 5: Invoke the request to the Microsoft Graph API Reference: https://docs.microsoft.com/en-us/graph/auth-v2-service https://docs.microsoft.com/en-us/graph/sdks/create-client.