Running a Recurrence Flow on Weekdays Only

RecurrenceRecurrence Triggers are essential for a wide variety of scenarios.  They can be used to run a flow on a specific date and time.  Or they can be used to run a flow on a recurring schedule, like once a day or once a month.  They can even be used in situations where  a process needs to run longer than the 30 day timeout limit on flows.

But what if your recurring schedule has exceptions.  For example, you might want to run it on the first Monday of each month or only on weekdays.  How can we use the recurrence trigger to handle these more complicated scenarios?

One possible solution is to trigger the flow on a simple schedule, like daily, and then test to see if its the right day.  If it is proceed with the flow, but if its not just exit.  This does work, but it consumes a lot of flow runs that are unnecessary.  Not only is this inefficient it may cause an issue with the limits on API calls in a 24 hour period.  It would be much better if we could take these conditions into account BEFORE the flow triggers.  But we can’t always reach that level of granularity in the trigger configuration itself. But we can if we use the trigger conditions available under settings.

Let’s look at a specific scenario.  I want this flow to trigger on each workday of the month. I start out by creating a flow with a trigger set to fire once a day.  This will create a flow that runs everyday of the month.  So far the trigger will look like this.

RecurrenceTrigger

Next I need an appropriate filter that will limit the trigger to only fire on Monday thru Friday.  If you aren’t familiar with how to write that filter I suggest using a ‘Filter array’ action to put it together.  After adding a ‘Filter array’ action to your flow fill in the left side of the comparison with the following formula:

dayOfWeek(utcNow())

That will take the current date and convert it to a number for the day of the week.  Monday = 1, Tuesday = 2, etc. Now finish the condition by choosing ‘is less than or equal to’ in the middle and enter ‘5’ on the right.  We haven’t filled in the Array to filter, but since all we want is the formula that’s OK.  We’ll be deleting this action after we copy the formula.  Your action should now look like this.

filter array

Now comes the trick that makes this worthwhile.  Click on the ‘Edit in advanced mode’ link. The action will now look like the following.

filter array advanced

The formula we need is the one highlighted in yellow.  Copy that formula to your clipboard and delete the ‘Filter array’ action.  Our finished flow doesn’t actually use it.  Now open the settings dialog for the recurrence trigger using the ellipses (…) menu on the trigger. Click the + Add link under Trigger Conditions and paste the formula you copied into the textbox that appears.  Your Settings should now look like this.

Settings

You can now click Done and your flow trigger each day if it is a Monday through Friday.  It will not trigger on Saturday, day 6, or Sunday, day 7. Using trigger conditions you can fine tune the schedule of your recurrence trigger to only fire when you want it to.

Microsoft Flow Virtual Summit – Demos

collab365-virtual-summitsToday was the first day of the Microsoft Flow Virtual Summit sponsored by Collab 365. I really enjoyed being able to sit back and watch my recorded session and spend my time answering questions from the attendees. The comments I got in the chat window were all very gracious and complimentary. It didn’t take long during the session for people to start asking if I would make my demos available after the session. I promised that I would export all seven and post them here on my blog and also send them to the Collab 365 folks to be posted on the Summit site. The demos have all been exported and sent via email to Collab 365.  Now I just need to upload them and post them here:

  1. Applying custom formatting to the approval email
  2. Recording approval results and comments
  3. Creating custom responses without premium licensing
  4. Forwarding an approval if the approver is out of the office
  5. Escalating an approval that hasn’t been responded to
  6. Periodic reminders about pending approvals
  7. Serial Approvals with dynamic list of approvers

Fix for: Can’t Connect to Azure VM via RDP

RDP errI use Azure Virtual Machines (VMs) a lot for demos and testing.  Recently when I tried to connect to some of my VMs using remote desktop I got a error message.  The message read “An authentication error has occurred. The function requested is not supported.”  Researching this error on the Internet led me to a security update applied to Windows 10 and Windows Server 2016 that was rolled out on April 17, 2018.  This update includes an update for the Remote Desktop Client (RDP) to fix a CredSSP authentication protocol vulnerability.  After the update is applied you can no longer RDP to any machine that isn’t fully updated.  My problem was that my Windows 10 laptop had been updated, but my Azure VMs had not been updated.

I’ve seen several fixes on the Internet to workaround this problem temporarily using registry settings or Group Policy Objects (GPO). Unfortunately, the only Active Directory server involved was also on Windows Server 2016, so there was no way to attach to it make registry changes or modify GPO settings. But I was able to find another workaround that let me access the affected servers via RDP so that I could update them.

The Solution

The trick was to find a server or workstation that hadn’t been updated yet. In my case I had a local Windows 8.1 Hyper-V VM that I hadn’t updated in a while.  Using that I was able to access the affected VMs and run Windows Update.  Once the update was applied I could RDP into them from my Windows 10 laptop.

I also found that I could still RDP from my iPhone to the affected servers to apply the update.  I admit that the screen size is pretty small and difficult to work with, but it is possible.  So if you don’t have a workstation or server that hasn’t been upgraded recently you can try to RDP in from your non-Microsoft phone.  Note: I didn’t try using Android, but I assume it will also work.

When Implementing SharePoint: Failing to Plan is Planning to Fail – Pt.2

plan-to-fail1Benjamin Franklin is reported to have said, “If you fail to plan, you are planning to fail!”
I’ve seen this scenario – the failure to plan – play out at many companies, especially when implementing or upgrading SharePoint environments.
Implementing or upgrading a product like SharePoint, that is designed to empower information workers to do things for themselves, requires detailed planning.
Why?
Because empowerment​ does not come from a “one size fits all” product or solution.
SharePoint can be used to tailor a solution and deliver business value to an organizations’ technical environment. But that kind of tailoring requires careful planning. Otherwise, an organization will end up with a product that is implemented well, but does not fulfill the strategic goals they’ve set for the business.
In my first post of this series, we evaluated the reasons why organizations do not spend enough time planning before implementing SharePoint. (Read part 1)  In part two of this series, we’ll identify at some of the planning tasks that are overlooked when planning a new SharePoint implementation.

Governance

Governance helps you determine how SharePoint will be used to make your organization better. There must be a shared vision and the appropriate controls in place to make that happen.

Goals

  1. Develop a shared strategic vision ​
  2. ​​Reach a consensus on how SharePoint will be used

Key Questions

  • Is our corporate culture comfortable with a self-service model?
  • What will we control using Policies versus customization of SharePoint?
  • What business needs will SharePoint address?
  • How will policy decisions be communicated, updated, and enforced?

Security

How SharePoint security is implemented must be done in accordance with corporate culture. If not, content won’t be available to the people that need it or won’t it be secured.

Goal

  1. Decide whether or not security administration will be centralized or delegated

​​Key Questions

  • Do business users just manage the content or actually own the content they produce?
  • ​Which is more important: timely access to content or guaranteed security?
  • Will training be provided for users who need to manage their own content?

Taxonomy/Folksonomy

If information architecture isn’t planned, content will go in, but it won’t be efficiently used after it is first stored. A good organizational methodology is critical to your success.

Goal

  1. Plan how content will be organized in order to make it easy to find

Key Question​

  • How will we implement a structure for organizing content?
  • How can users surface content that is important to them?

Architecture

Upfront planning will result in a physical system that maximizes performance while minimizing costs. It must also be flexible and grow as usage increases.

Goal

  1. A​chieve a balance between cost and performance

Key Questions

  • What services will we use and where will they be located?
  • How important is search in our environment?

High Availability (“HA”)/Disaster Recovery (“DR”)

In most organizations, SharePoint becomes a mission critical application when it is implemented well. A service that can’t be depended upon can be worse than one that is poorly implemented.

Goal

  1. Build an environment that can be depended upon as a critical application.

Key Questions

  • How much downtime can we tolerate?
  • How much data can we afford to lose?
  • How much will HA and DR cost?

Staffing

SharePoint focuses on providing a self-service environment. But, having the right staff in place to maintain the system is still a critical factor to your success.

Goal

  1. Plan adequate staffing to support implementation of the other planning decisions.

Key Questions

  • Centralized security will require more staff for versus delegated security
  • How will our information architecture be maintained and enhanced over time?
  • What level of patches and fixes will be applied? All Cumulative Updates or just Service Packs?

Training/Communications

Even if you build the perfect system, people won’t be able to effectively use it without the appropriate training. You must develop a communications and training plan.

Goal

  1. Increase user adoption and satisfaction

Key Questions

  • Develop and leverage local champions to increase knowledge and acceptance.
  • What is the right level of training and communications for your organization?

Spending some time planning will lead to a successful implementation that can transform the way your company collaborates and shares information. And that’s what you started your project for in the first place, right?

Managing External Sharing in Office 365 – Part 2

Office365This is the second in a series of posts that is reviewing details about how to manage External Sharing in Office 365.  This post will cover the process of what happens from the time you fill in the sharing dialog to share a site or document with another user until that user accesses the site.  For the purpose of this overview we won’t get into the specifics of how this process differs for an external user.  We’ll cover that in the third installment of this series.  If you haven’t read the first post in the series you can access it through the links below:

  • Part 1 – A high level walk-through of how to configure external sharing starting with your O365 tenant and going down to an individual site collection.
  • Part 2 – (This Post) How the process flow of sharing differs between sharing a site versus sharing a document and how Office 365 adjusts this experience
  • Part 3 – How external sharing depends on the site collection access request list to manage permissions for an external sharing invitation
  • Part 4 – How to use PowerShell to manage external users

How Sharing Works

To understand how external sharing works you first need to understand what happens when a user shares a document or site.  In this post we’ll trace the process that SharePoint goes through whenever something is shared.  We’ll take a look at what permissions are required to share a site or document and explain what the user experience is for a user who receives a sharing request.  Along the way we’ll discover that there is a significant difference between the experience of the recipient when receiving an invitation to share a site versus share a specific document.  We’ll also point out a potential difference in the experience between sharing in Office 365 versus an On-premises SharePoint environment. Note:  we’ll dig more into the differences between SharePoint On-line and SharePoint On-premises in Part 3 of this series.

Sharing a Site

If you are the Site Collection Administrator (SCA) or Site Owner (SO) the process for sharing a site or a document is the same.