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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Workaround for Non-Eng...
Power Automate
Unanswered

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,129 Super User 2025 Season 2 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,129 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 463 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 427 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard