I'm trying to get the user context in my React web part and I am getting 404's when requesting: https://localhost:4321/_api/web/currentuser
This is the part of the code that fetches the current user:
private GetUserProperties(): void {
/*
pnp.setup({
spfxContext: this.context
});
*/
pnp.sp.web.currentUser.get().then((r: CurrentUser) => {
console.log('CURRENT USER', r);
});
}
This was setup as a SharePoint online application. I've tried several different solutions with no luck.