nerdexam
Microsoft

MS-600 · Question #17

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?

The correct answer is A. MSGraphClient. 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…

Extend and customize Microsoft 365 with SharePoint Framework

Question

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?

Options

  • AMSGraphClient
  • BAadHttpClient
  • CSPHttpClient
  • DXMLHttpRequest

How the community answered

(24 responses)
  • A
    71% (17)
  • B
    17% (4)
  • C
    8% (2)
  • D
    4% (1)

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. overview?view=graph-rest-1.0 https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aad-tutorial

Topics

#MSGraphClient#SPFx#Teams membership#API client

Community Discussion

No community discussion yet for this question.

Full MS-600 Practice