Skip to main content
Community site session details

Community site session details

Session Id : mk5aUXu+NoX1RiZbTztOGJ
Power Automate - Building Flows
Answered

Automate to Check if Autoreply Enabled (Not Configured)

Like (0) ShareShare
ReportReport
Posted on 3 May 2022 12:16:59 by

Hi,

Trying to update a list of available employee's by checking if they have Autoreply enabled or not. I understand we can use Get mail tips for a mailbox v2 but this only tells if autoreply is configured or not- not enabled or not. Mostly users have configured their auto reply for a previous occasion not necessarily indicates that the user is out of office.. hence want to know if we can retrieve information related to autoreply enabled.. i.e. - Get-MailBoxAutoReplyConfiguration.

  • tuxmc Profile Picture
    10 on 30 Oct 2024 at 01:45:58
    Automate to Check if Autoreply Enabled (Not Configured)
    Good Topic...
     
    Unfortunately, Microsoft made it harder in the new version. Now we have a new scenario (challenge). 
     
    The automatic reply can be enabled but the message is blank or null.   
     
    Thanks, Microsoft, for making our life harder! 
     
     
  • Verified answer
    u4jaanus Profile Picture
    on 06 May 2022 at 12:09:19
    Re: Automate to Check if Autoreply Enabled (Not Configured)

    Update: Thanks Ellis for directing me towards the correct path. Wanted to update the post so others could get help.

    In Auto reply there can be Four scenarios and each scenario will return a different format when "Get Mail Tips for all mailbox (V2)" is used.

    1st Scenario as you mentioned above "who don't have automatic replies enabled, the message property is empty:"

     

    [
     {
     "mailboxFull": false,
     "externalMemberCount": 0,
     "totalMemberCount": 1,
     "deliveryRestricted": false,
     "isModerated": false,
     "maxMessageSize": 37748736,
     "emailAddress": {
     "name": "",
     "address": "user@email.com"
     },
     "automaticReplies": {
     "message": ""
     }
     }
    ]

     

    2nd Scenario as your mentioned above "users who have automatic replies enabled, the message property contains text:"

     

    [
     {
     "mailboxFull": false,
     "externalMemberCount": 0,
     "totalMemberCount": 1,
     "deliveryRestricted": false,
     "isModerated": false,
     "maxMessageSize": 37748736,
     "emailAddress": {
     "name": "",
     "address": "user1@email.com"
     },
     "automaticReplies": {
     "message": "I'm out of the office ...."
     }
     }
    ]

     

    3rd Scenario as you mentioned above "who have automatic replies enabled, some have set a scheduled start and end time:"

     

    [
     {
     "mailboxFull": false,
     "externalMemberCount": 0,
     "totalMemberCount": 1,
     "deliveryRestricted": false,
     "isModerated": false,
     "maxMessageSize": 37748736,
     "emailAddress": {
     "name": "",
     "address": "user2@email.com"
     },
     "automaticReplies": {
     "message": "I'm out of the office ....",
     "scheduledStartTime": {
     "dateTime": "2022-04-14T16:00:00.0000000",
     "timeZone": "UTC"
     },
     "scheduledEndTime": {
     "dateTime": "2022-05-04T08:30:00.0000000",
     "timeZone": "UTC"
     }
     }
     }
    ]

     

    The Fourth Scenario is when User have auto reply message set but autoreply is not active. i.e. previously an auto reply was active but then was disabled. this will return an empty object i.e. "automaticReplies": {}. 

    I tried using condition to check if the output is 0 but was having the issues as {} is not 0 hence i was getting it wrong. 

    I used empty() function with target to "automaticReplies/messages" if true means user is in office and false means user is out of office.

    Hope this help others.

  • u4jaanus Profile Picture
    on 04 May 2022 at 09:46:09
    Re: Automate to Check if Autoreply Enabled (Not Configured)

    For me Null didnt work. I left it empty to make it work.

  • u4jaanus Profile Picture
    on 04 May 2022 at 09:45:41
    Re: Automate to Check if Autoreply Enabled (Not Configured)

    Hi Ellis, 

    Actually you are right; when I was checking yesterday; the user I was checking was out of office hence was getting values in Message caused me confusion if I am using it correctly or not. Today i tested different users and Yes message tag is empty if Out Of Office is not set. 

  • Verified answer
    Craig Stewart ABZ Profile Picture
    957 Super User 2024 Season 1 on 03 May 2022 at 21:08:10
    Re: Automate to Check if Autoreply Enabled (Not Configured)

    Just popping on to say that on the condition I had to add null as an expression for this to work rather than leave it blank.

  • Verified answer
    Ellis Karim Profile Picture
    11,157 Super User 2025 Season 2 on 03 May 2022 at 20:40:42
    Re: Automate to Check if Autoreply Enabled (Not Configured)

    Hi @u4jaanus ,

     

    I ran the Get Mail Tips for all mailbox (V2) for all users on my tenant.

    I observed that user who don't have automatic replies enabled, the message property is empty:

     

    [
     {
     "mailboxFull": false,
     "externalMemberCount": 0,
     "totalMemberCount": 1,
     "deliveryRestricted": false,
     "isModerated": false,
     "maxMessageSize": 37748736,
     "emailAddress": {
     "name": "",
     "address": "user@email.com"
     },
     "automaticReplies": {
     "message": ""
     }
     }
    ]

     

    I also observed that users who have automatic replies enabled, the message property contains text:

     

    [
     {
     "mailboxFull": false,
     "externalMemberCount": 0,
     "totalMemberCount": 1,
     "deliveryRestricted": false,
     "isModerated": false,
     "maxMessageSize": 37748736,
     "emailAddress": {
     "name": "",
     "address": "user1@email.com"
     },
     "automaticReplies": {
     "message": "I'm out of the office ...."
     }
     }
    ]

     

    And those users who have automatic replies enabled, some have set a scheduled start and end time:

     

    [
     {
     "mailboxFull": false,
     "externalMemberCount": 0,
     "totalMemberCount": 1,
     "deliveryRestricted": false,
     "isModerated": false,
     "maxMessageSize": 37748736,
     "emailAddress": {
     "name": "",
     "address": "user2@email.com"
     },
     "automaticReplies": {
     "message": "I'm out of the office ....",
     "scheduledStartTime": {
     "dateTime": "2022-04-14T16:00:00.0000000",
     "timeZone": "UTC"
     },
     "scheduledEndTime": {
     "dateTime": "2022-05-04T08:30:00.0000000",
     "timeZone": "UTC"
     }
     }
     }
    ]

     

    I checked if the message property contained text:

    Snag_dc8b3a.png

    The expression I used in the Condition to reference the message property: 

     

    outputs('Get_mail_tips_for_a_mailbox_(V2)')?['body/value']?[0]?['automaticReplies/message']

     

    For more info on this, see video:  Detecting Out of Office Recipients using Power Automate

     

    Hope this helps.


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete