question

AniruddhaAditya-3867 avatar image
0 Votes"
AniruddhaAditya-3867 asked TongZhangMSFT-7548 commented

Display Logged in User Name


Hi,

I want to display the logged-in User Name and location just adjacent to the image of the user as shown in the attachment. Getting the values isn't an issue. I am able to get the Logged-in User from the context and Location from the user profile. But How to target the exact location is. I am using SPFx extension but cannot figure out how to tag the value on the top bar.

Hint, Code Snippet Most welcome.

200869-image.png


Thanks
Aniruddha

office-sharepoint-online
image.png (8.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AniruddhaAditya-3867,

I am currently doing some research on this issue, will let you know as soon as possible.

1 Vote 1 ·
TongZhangMSFT-7548 avatar image
0 Votes"
TongZhangMSFT-7548 answered TongZhangMSFT-7548 commented

Hi @AniruddhaAditya-3867,

According to my research and testing, There is no way to customize the Top Navigation Suite Bar, so it is unable to display the location on it.

As a workaround, I found a way to change the settings to display the User Name in Top Navigation Suite Bar.(The User Name is next to the user image, as shown in the screenshots)

201357-image.png

You can follow these steps:

  1. Login to Office 365 Admin Center;

  2. Click on Settings >> Org Settings

  3. On the Org Settings page, click on the “Organization Profile” tab at the top and then click on the “Custom themes” link.

  4. In the custom themes property panel, scroll down and select the “Show the user’s display name” checkbox at the bottom of the page.

  5. Click on “Save changes” to apply your settings.

201356-001.png

Hope it can help you .Thanks for your understanding and support.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.






image.png (2.6 KiB)
001.png (135.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AniruddhaAditya-3867,

I am checking to see if the problem has been resolved. If you have any questions or progress, you can contact me in time.

0 Votes 0 ·
AniruddhaAditya-3867 avatar image
0 Votes"
AniruddhaAditya-3867 answered TongZhangMSFT-7548 commented

@TongZhangMSFT-7548 I am still working on this issue. Playing around with DOM and Divs to see if I can inject additional div and place the text over there. though you have mentioned, it's not possible at the site collection level.

We cannot do any changes at a tenant level, since there are 75k sites, and any global changes at the tenant level need 1000s of approval.

I am still working on it and if I am lucky will let you know.

Thanks
Aniruddha

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AniruddhaAditya-3867,

Thanks for your update. If you have any progress, please feel free to reply.

0 Votes 0 ·