web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How to strip out authe...
Power Pages
Unanswered

How to strip out authenticated users text from display

(0) ShareShare
ReportReport
Posted on by 7,044 Most Valuable Professional

Hello Guys, 

 

In one of the web page I am printing the current user role of the user using liquid template 

 

{{user.roles}}

 

And it display like below. 

 

ragavanrajan_0-1608112920583.png

Is there anyway I can strip out "Authenticated Users"  and add comma (,) between all the web roles. In my case ( Napier, Edison Users) are two web roles. 

Appreciate your input on this.  Thanks 

 

Categories:
I have the same question (0)
  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    you can apply Liquid filters to manipulate text etc

    https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-filters#string-filters

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Thank you @Fubar , I tried the string manipulation remove but it is throwing the following error

     

    Liquid error: Object of type 'System.String[]' cannot be converted to type 'System.String'.

     

     

     

     

  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    Are you looping user.roles (as it will probably be an array or collection)

  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @ragavanrajan ,

    @Fubar is pointing correctly that user.roles is an array of strings (as per docs), not a string. You need to loop through it:

    {% for role in user.roles %}
    {% comment %}Do something with the role{% endcomment %}
    {{ role }}
    {% endfor %}

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 64

#2
DP_Prabh Profile Picture

DP_Prabh 36

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 30 Most Valuable Professional

Last 30 days Overall leaderboard