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 / Null Variable - use th...
Power Automate
Answered

Null Variable - use the word NULL in http requst

(0) ShareShare
ReportReport
Posted on by

Working through mobile phone logic for Azure AD update user flow. 

If a mobile phone doesn't exist, I current have a variable set the value of NULL. 

notSettingMobile.png


When passing that to variable to Update User (AzureAD activity) or PATCH http GraphAPI call,the variable is an empty string and produces the two "", which isn't accepted as a valid entry

 

c2e5da69-ffda-471c-86ad-094bfb31d2cd.png

If, within the JSON payload for the graphAPI call, or in the mobilePhone property of Update User, I use the function NULL, the flow will work and accept NULL. 

 

NULL-In-PayLoad.png

 

The output now (successful), is the actual word null, not enclosed in "" which graphAPI accpets, and the field within AzureAD is actually null. (no white space for example, which I have read as a workaround!)

proper-null.png

 

Question, how do I pass, actual NULL to the JSON payload, if the variable string is empty?

 

Categories:
I have the same question (0)
  • Verified answer
    LW-28112008-0 Profile Picture
    on at

    Fixed using this expression found here automatically accept an empty string as a null val... - Power Platform Community (microsoft.com)

     

    where there is a conversion of the empty string to an actual NULL value!

    I used

    if(empty(variables('mobile')),null,variables('mobile'))

     

    where a variable (type string) named mobile, was populated with NULL function. 

    Adding the IF statement, to populate the JSON payload entry

     

     

  • v-xiaochen-msft Profile Picture
    on at

    Hi @LukePWilkins ,

     

    Glad to see you resolved this issue.

    You coulr mark your own reply to close the case.

     

    Best Regards,

    Wearsky

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard