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

Community site session details

Session Id : sUmREKTu0ujvY1Zlc6FbUw
Power Automate - Building Flows
Answered

Creating AD user from Forms. Empty answers problem.

Like (0) ShareShare
ReportReport
Posted on 23 Jun 2021 11:33:09 by 28

I want new user to be created via Microsoft forms. Not all of the properties are mandatory to fill out. Like phone number for example. If the tile is left empty i get this error:

"Invalid value specified for property 'mobilePhone' of resource 'User'.",
    "details": [
      {
        "target""mobilePhone",
        "code""InvalidLength"
      }
 
I searched forum but cant find the solution.
 
I have the same question (0)
  • AgileGrrrrrg Profile Picture
    28 on 24 Jun 2021 at 07:40:46
    Re: Creating AD user from Forms. Empty answers problem.

    Worked like a charm, Cheers : )

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on 23 Jun 2021 at 18:40:21
    Re: Creating AD user from Forms. Empty answers problem.

    Hello @AgileGrrrrrg ,

    you can try using the if(...) expression on the optional columns.

    if(condition, ifConditionTrue, ifConditionFalse)

    In your situation you want to check if the input from MS Forms is empty. If true, if it's empty, use the null value, if it's not empty, use the actual value from the MS Forms.

    if(empty([dynamicContentFromMSForms]), null, [dynamicContentFromMSForms])
    
    Note:
    [dynamicContentFromMSForms] is a placeholder, replace it with the dynamic content from the MS Forms!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete