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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get the initial...
Power Automate
Answered

How to get the initial of a surname to use in user creation

(0) ShareShare
ReportReport
Posted on by 16

Hey all,


I'm building a new user creation flow to simplify the existing process. The format of users mail is:

Firstname.initialoflastname@contoso.com

 

flow.PNG

So I would like to replace the "lastname" in the MailNickname field and "lastname" in the UPN field with firstname.initialoflastname and I'm struggling to do so. I can see that there is a method of doing this with a concat expression but actually executing it is a problem.

 

Help would be hugely appreciated.

 

Cheers,

SP

Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Stellarprojects,

     

     

    Please refer to screenshot below to add the expression with concat:

    Capture.PNG

     

    The expression in the User Principle Name as below:

    concat(triggerBody()?['First_x0020_Name'],'.initialoflastname@contoso.com')

     

    Best regards,

    Alice

  • Stellarprojects Profile Picture
    16 on at

    Hey Alice,


    I have explained this poorly, I do not have the users initials available to me, so i'd like to get the initial of the surname if possible.

    I do have users First_x0020_Name and Last_x0020_Name, so is there a way to split the Last_x0020_Name to get the first letter only?


    Cheers,
    SP

  • Verified answer
    Stellarprojects Profile Picture
    16 on at

    If anyone is interested I solved this by using

    toUpper(substring(triggerBody()?['Last_x0020_Name'],0,1))
     
    Cheers

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!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard