cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Out of Office on behalf of another users for helpdesk

Hi,

I'm working on the out of office template on PowerApps, but I need to do only one thing to make it more efficient.

The app gets the data of the logged on user  as per the connectors:
Office365

Office365Users

However we need to make it work for helpdesk team to make them able to activate the autoreply on behalf on any other user in the company.

Your help is much appreciated.

 

Regards,
Ahmed

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

The issue is effectively around permissions - Office365 does not allow you to set anything on a mailbox that you don't have Full Access rights to unless you are doing so via an Administrator account.

 

If your helpdesk users have administrative rights, they can use the Office356 Exchange admin portal to set out of office messages, or else they can use the following PowerShell script:

 

Set-MailboxAutoReplyConfiguration mailboxname@domain.co.uk –AutoReplyState Scheduled –StartTime “1/8/2013” –EndTime “1/15/2023” –ExternalMessage “This account is no longer monitored. Please direct all correspondence to mailboxname2@domain.co.uk” –InternalMessage “This account is no longer monitored. Please direct all correspondence to Head Office”

 

But there's no way to do it with a standard account that does not have Full Access rights to the account its trying to set,

 

Cheers,

Sancho

 


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

3 REPLIES 3
Super User II
Super User II

Hi,

 

Unfortunately you won't be able to do this - I have looked into this before for my own purposes -  the Out of Office template App uses the currently logged in users credentials and the Office365Outlook connector to set their own out of office. This connector does not have the functionality for the setting of others' out of office.

 

The code it uses is:

//schedules the automatic replies
Office365.SetAutomaticRepliesSetting(
   "Scheduled",
   If(
       _sendExternalResponse,
       "All",
       "None"
   ),
   {
       ScheduledStartDateTimeOffset: _startTimeUTC,
       ScheduledEndDateTimeOffset: _endTimeUTC,
       InternalReplyMessage: InternalMessage.HtmlText,
       ExternalReplyMessage: ExternalMessage.HtmlText
   }
)

 

You can view the details of the connector here and check for yourself that there is no option for scoping it against other accounts: https://docs.microsoft.com/en-us/connectors/office365/#set-up-automatic-replies-(v2) 

 

Kind Regards,

Sancho


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Thanks a lot Sanchos for your reply.

 

Ok, I'm almost desperate regarding this function.

May I ask you what have you done sorting this out? I mean have you found a way to make OOO on behalf on another user with another tool other than powerapps, for example powerautomate or powershell?

 

Regards,

Ahmed

Hi,

 

The issue is effectively around permissions - Office365 does not allow you to set anything on a mailbox that you don't have Full Access rights to unless you are doing so via an Administrator account.

 

If your helpdesk users have administrative rights, they can use the Office356 Exchange admin portal to set out of office messages, or else they can use the following PowerShell script:

 

Set-MailboxAutoReplyConfiguration mailboxname@domain.co.uk –AutoReplyState Scheduled –StartTime “1/8/2013” –EndTime “1/15/2023” –ExternalMessage “This account is no longer monitored. Please direct all correspondence to mailboxname2@domain.co.uk” –InternalMessage “This account is no longer monitored. Please direct all correspondence to Head Office”

 

But there's no way to do it with a standard account that does not have Full Access rights to the account its trying to set,

 

Cheers,

Sancho

 


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,371)