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 Automate / Workaround for Non-Eng...
Power Automate
Answered

Workaround for Non-English Characters in User Principal Names (UPNs) in Power Automate AD Account Creation

(0) ShareShare
ReportReport
Posted on by 169

Hey everyone,

I'm running into an issue while creating Active Directory (AD) user accounts using Microsoft Power Automate. The problem is that the User Principal Name (UPN) field only accepts standard English characters (no Š, Đ, Č, Ć, Ž, etc.). This is causing problems because I need to generate UPNs based on users' names, which often include these Croatian characters.

Has anyone found a good workaround for this? I'm looking for a way to either:

  1. Translate: Automatically translate Croatian characters into their English equivalents (e.g., "Š" to "S", "Đ" to "Dj") before creating the UPN.
  2. Alternative UPN Format: Find a way to structure the UPN that doesn't rely solely on the user's name but still uniquely identifies them.

Any suggestions, code snippets, or examples of how you've solved this would be greatly appreciated!

Bambula_1-1717610167095.png

 

 

Thanks in advance!

 

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Bambula 

     

    I am agreeing with your first 2 approaches, based on that i can suggest solutions

     

    1. Translate-  This would be a good approach, I could see there are translation actions in Power automate that can help to convert these languages to english.

    Nived_Nambiar_0-1717611459305.png

     

    Other approach may be crazy is to create a prompt in AI Hub where you will create a prompt which accepts the Croatian format sentence and gives back English formatted ones

    I have created a custom prompt like this 

    Prompt:
    You will be given sentences in Croatian. Your task is to convert each sentence to its English transliterated format by replacing specific Croatian letters with their corresponding English letters.
    This will be crotian sentence- 
    Input:
    A sentence or a list of sentences in Croatian.
    Output:
    The transliterated English format of each sentence.
    Example:
    Input: "Čovjek jede štrudlu." Output: "Covjek jede strudlu."
    Input: "Želim posjetiti Zagreb." Output: "Zelim posjetiti Zagreb."
    
    Need english formated sentence as output, no other extra words /sentences

     

    This will be created in AI Hub and then use the Create Text with GPT actions to where we will be passing crotian sentence and gives us an output of english formatted data.

     

    For more details on how to use this action and creating AI prompt- refer this blog> https://nivednambiar.wordpress.com/2024/03/25/excel-document-summarizer-using-power-automate-and-gpt-actions/

     

     

    2. Alternative UPN Format > For this approach- what i could think is of using Guid() expression which returns unique identifier, This expression can be written like below

    Nived_Nambiar_1-1717612232675.png

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Verified answer
    Bambula Profile Picture
    169 on at

    Hi @Nived_Nambiar ,

     

    Thank you for your detailed and helpful response! I appreciate you sharing the translation and GUID approaches.

    Unfortunately, we don't have AI Hub available in our company's environment, so I had to find a different solution. I ended up using a similar workaround to the one you suggested for translation, directly incorporating the character replacement logic into a variable within my flow:

    @{replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(body('Get_item')?['FirstName'],'Š','S'),'š','s'),'Đ','Dj'),'đ','dj'),'Č','C'),'č','c'),'Ć','C'),'ć','c'),'Ž','Z'),'ž','z'),'Dž','Dz'),'dž','dz')}

    This seems to be working well for now.

     

    Thanks again for taking the time to help out!

     
     
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Bambula 

     

    Good to know issue got resolved !

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

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
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard