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
  •  | 
  •  

문제

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

도움이 되었습니까?

해결책

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top