Home » Microsoft » MS-600 v.2 » Which object should you use to connect to the API from the solution?
You have an API that is secured by using Azure Active Directory (Azure AD).
You are designing a SharePoint Framework (SPFx) solution.
Which object should you use to connect to the API from the solution?
A. SPHttpClient
B. HttpClient
C. AadHttpClient
Correct Answer: C
Explanation/Reference:
By using the AadHttpClient, you can easily connect to APIs secured by using Azure AD without having to implement the OAuth flow yourself.
Reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient