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 / Action 'Create_user' f...
Power Automate
Unanswered

Action 'Create_user' failed, Invalid value specified for property 'mailNickname' of resource 'User'.

(0) ShareShare
ReportReport
Posted on by 318

Hi

 

I am trying to create a onboarding process, i have a flow to create AD account for new joiner. The flow was working fine few days back but now i get this error Invalid value specified for property 'mailNickname' of resource 'User'. 

VikasNagaraj_0-1646926842179.png

Here is the picture of the flow.

VikasNagaraj_1-1646926901934.png

My company uses First name and first letter of last name for email address, so i am using toUpper(substring(triggerBody()?['LastName'],0,1)) to achieve this.

 

Please help!

 

Categories:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    Maybe the nick name is being empty @VikasNagaraj 

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @VikasNagaraj :

    As the error message indicates the provided mail alias name is not in correct format or it includes invalid special characters. So try the below cases to fix this problem.

    • Remove white spaces in mailNickname (mail alias, email address).
    • Remove special characters in mailNickname (Ex: Space and “(),:;<>@[]).

    I think this link will help you a lot:

    Fix : BadRequest – Invalid value specified for property ‘mailNickname’ of resource ‘User’ 

    Best Regards,

    Bof

  • VikasNagaraj Profile Picture
    318 on at

    @v-bofeng-msft 

    I managed to figure it out, it was the space issue. if there are space or any special character it gives a error. Thank you

    I have one more issue i have posted it last week, will be really helpfull for me, please help me solve it.

    https://powerusers.microsoft.com/t5/Building-Flows/Condition-help-for-onboarding-process/m-p/1490235#M166547

     

  • Biaigo Profile Picture
    6 on at

    Just to make sure I understand what you said, because I'm having a problem with it.  The MailNickname is an email address, but you can't use the '@'  ??

  • VikasNagaraj Profile Picture
    318 on at

    @Biaigo 

    Hi, i had this error because one of my managers gave a space after entering the email id. so make sure there is no space before or after when they enter it in sharepoint, if there is a space the the flow wont run.

  • Biaigo Profile Picture
    6 on at

    Vikas- that was my issue.  I wrapped my expression in a trim and it started working again.  

  • jguzmanlozada Profile Picture
    27 on at

    Greetings @VikasNagaraj and everyone from the tread!

     

    I am experiencing this exact same issue and I would hate to create a new case.  I revised the resolution and I am making sure there are no spaces nor special characters.   To test that, I've tried entering the email plain, with no quotes but also  wrapped it like  "test.user@mydomain.com" and even 'test.user@mydomain.com' but the flow always fails with "Invalid value specified for property 'mailNickname' of resource 'User'."

     

    I did a sample run to show how my form is filled and how its shown on my flow:

     

    Form:

    jguzmanlozada_0-1663173793074.png

     

    Flow showing data from form:

    jguzmanlozada_1-1663173841352.png

    If I remove the Azure AD creation step, the flow works as it has some email notifications and affects an excel table.  But I want to create the user with no avail.

     

    Thanks in advance!

    JG

     

  • kurthutchinson Profile Picture
    3 on at

    I can't figure this out either.  As you can see the way I'm passing mailnickname should be correct as well.

     

    kurthutchinson_0-1663258520759.png

     

  • VikasNagaraj Profile Picture
    318 on at

    @jguzmanlozada & @kurthutchinson 

    Could you please put a screenshot of your flow? 

  • CoachOffice365 Profile Picture
    63 on at

    I also don't understand how to fix the error "Invalid value specified for property 'mailNickname' of resource 'User'." Would it be possible to completely remove the @-sign (as it is the culprit of my erroneous flow, I believe)? Or is it still needed for some function? What is the field 'mailNickname' even used for? Does anybody know?

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard