MSGraphClient class
MSGraphClient is used to perform REST calls against Microsoft Graph.
Remarks
The Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API. This class allows developers to start making REST calls to MSGraph without needing to initialize the the MSGraph client library. If a custom configuration is desired, the MSGraphClient api function needs to be provided with that custom configuration for every request.
For more information: https://github.com/microsoftgraph/msgraph-sdk-javascript
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the MSGraphClient
class.
Methods
api(path, config) | All calls to Microsoft Graph are chained together starting with the api function. |
Method Details
api(path, config)
All calls to Microsoft Graph are chained together starting with the api function.
api(path: string, config?: Options): IGraphRequest;
Parameters
- path
-
string
The path for the request to MSGraph.
- config
- @microsoft/microsoft-graph-client!Options:interface
Sets the configuration for this request.
Returns
Remarks
Path supports the following formats: * me * /me * https://graph.microsoft.com/v1.0/me * https://graph.microsoft.com/beta/me * me/events?$filter=startswith(subject, 'ship')
The authProvider and baseUrl option should not be used, as they have already been provided by the framework. See the official documentation here: https://github.com/microsoftgraph/msgraph-sdk-javascript