I am using the Login component <Login /> of the Microsoft Graph Toolkit (React flavor). How can I retrieve the display name and User Principal Name of the logged in user?
I see that the component has a loginCompleted prop, but the user is not passed as argument.
userDetailsobject from the login component? in js, something like: let person = document.querySelector('mgt-login') console.log(person.userDetails) This object should contain both the upn and the displayName properties. - Nic Vogt