SPFX: How to build a welcome web part where that web part displays the current user login name when they logged in [closed]

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/251499

  •  25-01-2021
  •  | 
  •  

Domanda

How to build a welcome webpart to show the current user name after welcome in sharepoint online

È stato utile?

Soluzione

To build a welcome webpart, microsfot has a very well documented steps given here.

Here in step 7, they have declared some default properties to show on webpart. like description, test, etc.

Similarly, you can create one more property to show the display name of current user.

To get the details of current logged in user, check this question.

Also, in SharePoint online you can get the display name of current user using following code:

var currentUserName = _spPageContextInfo.userDisplayName;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top