This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Which SharePoint Framework object should you use to call an anonymous, non-Microsoft REST API?
The HttpClient object, accessed from the web part's context.
HttpClient
The AadHttpClient object, accessed from the web part's context.
AadHttpClient
The MSGraphClientV3 object, accessed from the web part's context.
MSGraphClientV3
Which object do you use to call a REST API secured with Microsoft Entra ID?
The AadHttpClient object, created from the context's aadHttpClientFactory.
aadHttpClientFactory
The HttpClient object, accessed directly from the web part's context.
The SPHttpClient object, accessed directly from the web part's context.
SPHttpClient
How does a SharePoint Framework web part obtain an instance of the Microsoft Graph client?
By calling the getClient() method on the context's msGraphClientFactory.
getClient()
msGraphClientFactory
By calling new MSGraphClientV3() directly in the web part.
new MSGraphClientV3()
By sending a request to the SharePoint REST API /_api/graph endpoint.
/_api/graph
How do you request the permissions a SharePoint Framework solution needs to call Microsoft Entra ID secured APIs or Microsoft Graph?
Add webApiPermissionRequests entries to the solution's package-solution.json file, then approve them on the API access page in the SharePoint admin center.
webApiPermissionRequests
package-solution.json
Add the permissions to the web part manifest; they're granted automatically when the solution is deployed.
No request is needed; a SharePoint Framework solution inherits all permissions of the signed-in user.
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?