How to Retrieve the Current User Name in SPFx Without Extra Permissions
In SPFx development, there are scenarios where you might need to obtain the current user’s name. While Microsoft Graph is a robust option for SharePoint API data, it can sometimes be an overly complex solution for simple tasks due to the permissions required. For our purposes, we’ll use PnP JS, which offers a more streamlined approach without the need for additional permissions.