I am trying below code but getting error https://xxxxxxx.sharepoint.com/sites/xxxxxxx/15/v1.0/me/drive/sharedWithMe 404 (Not Found)
private _getFilesSharedWithMe(): Promise<any> {
return this.props.context.httpClient.get(`v1.0/me/drive/sharedWithMe`, SPHttpClient.configurations.v1).then((response: HttpClientResponse) => {
if (response.ok) {
return response.json();
} else {
console.warn(response.statusText);
}
}).then((respJSON: any) => {
console.log(respJSON);
return respJSON;
});
}
Graph API
into SPFx so you follow this article which describes in detail how to consume graph api in SPFx