SharePoint 2019 Solution: “Sorry, apps are turned off. If you know who runs the server, tell them to enable apps.”

Photo by Artem Beliaikin from Pexels

Without an App Catalog and a setting enabled, your users may run into the following error when attempting to access the SharePoint Store from the “Add an app” dialog:

“Sorry, apps are turned off. If you know who runs the server, tell them to enable apps.”

If you’ve run into this issue and are a farm admin, you can enable the app store and ability in SharePoint 2019 by following these steps. If you’ve already created the App Catalog site collection, skip to step 4.

1. Log onto your central admin server and open central admin

Click to enlarge

2. Choose Apps > Manage App Catalog. Make sure the Web Application shown is the correct web application then click OK to create a new App Catalog (or enter a URL for one if you’ve already created one)

Click to enlarge

3. Set the App Catalog site name and description, URL, admin, and then end users who should see apps in the catalog.

Click to enlarge

4. Once you have an App Catalog, go back to Apps > Configure store settings.

Click to enlarge

5. Confirm the Web Application shown is the correct web app, then change App Purchases to Yes. Save your changes.

Now when users who were granted access to view apps in the store choose SharePoint Store from the “Add an app” dialog, they’ll be able to get marketplace apps as well.

Click to enlarge

Hide the Browse and Edit buttons and/or the Share, Follow, and Focus/Full-Screen buttons from a SharePoint page’s ribbon menu

Photo by Drew Rae from Pexels

I know I’m blogging a lot about CSS changes lately, and it’s not normally something I recommend. But for a very specific project of mine, I’ve been doing a lot of this and am sharing a few tips along the way in case they help others needing to accomplish something similar.

Hide the Browse and Edit buttons/tabs

Click to enlarge

In this post, I’ll share how to hide the Browse and Edit tabs from the ribbon menu of a SharePoint page. This only applies to classic experience pages. To hide these tabs/buttons, add the following CSS inside a <style> tag to the page(s) on which you wish to remove these options.

.ms-cui-tt a[Title='Browse'],.ms-cui-tt a[Title='Edit']{
display:none;
}

If you’re unsure how to add CSS to your page, this post details the steps with a different script. Just use the script above inside <style> tags instead.

You can also hide other tabs like Page, Files, Library, etc. by adding a comma right before the opening brace ({) and then pasting another .ms-cui-tt a[Title=’Page’] (substituting the tab name of course). This only works for some, but not all tabs.

Hide the Share, Follow, and Focus/Full Screen buttons

You may also wish to hide the three buttons on the right side of the ribbon seen here:

Click to enlarge

Similar to above, we’ll just set the #RibbonContainer-TabRowRight ID to not display. This one has to have !important added inside the semi-colon for it to override competing code and take effect as expected.

#RibbonContainer-TabRowRight{
display:none!important;
}

Style embedded html iframe and border so it doesn’t look sunk on the page

Photo by Zukiman Mohamad from Pexels

If left unstyled, your embedded iframe content when working with html pages appears inside “sunken” boxes/frames (browser and context-dependent, of course). I don’t find this look to be very appealing, so I typically adjust the iframe’s properties a bit in the html to give it a little less sink and a little more pop. I add specific width and height values to be exact about where I’m placing it and what it contains, and I use box-shadow instead of border which gives it that “lift” off the page.

Consider the following script just a starting place, then get creative with your own content and design. You’ll want your embedded content to “fit in” with the rest of its page’s contents so try to be consistent if you have other boxed elements/containers on the page (Tip: Use F12 and element selection to see the style properties of other parts of your page).

<iframe src="https://sharepoint.contoso.com/SitePages/MyLinks.aspx" border="0" frameborder="0" style="border-style:none;box-shadow:0px 0px 2px 2px rgba(0,0,0,0.2);width:262.5px;height:250px;" cellspacing="0"></iframe>

P.S. I’m sure I could write this prettier, but it works. For instance, you could reference the iframe in your CSS rather than hard-coding it in the html body.

Make full-width SharePoint hyperlink column clickable beyond just the link text

Photo by Pixabay from Pexels

This is such an obscure topic, but maybe it will help somebody curious out there. I recently had a request to alter a classic experience list with a single hyperlink column so that users could click in the white space of a cell and it takes them to that cell’s hyperlink value as if they’d actually clicked the link.

To illustrate what I mean, notice how the arrow pointer changes to a hand cursor like the whole cell is clickable. And when white (blue) space of the Google link is clicked, it takes us to Google anyway:

Click to enlarge

This was done with the tiniest bit of CSS added to the page inside a <style> tag. Note that this will affect all links in tables on the page to which it’s applied. So if you have more than one table on the page, this could cause issues. But in my case I just had the single-column list I was working with and this sufficed.

td a {
    display:inline-flex;
    width:100%;
}

Good luck!

Solution: SharePoint Designer email action’s To: line has a valid email address, but is removed and doesn’t send when triggered

Photo by Snapwire from Pexels

If you’ve created a workflow in SharePoint Designer and an email action appears to be configured correctly, but emails aren’t being sent to some individuals in the To: line, you may need to turn the email being used into a workflow variable and use that instead of direct addition to the To: line of the email step.

This often happens for group email inboxes or external recipients that aren’t just a “normal user.” If there is a mix of recipients, some may receive the message but the troublesome addresses don’t even appear in the To: line, as if they’re removed before sending.

Note: If you’re sending to external recipients specifically and this post doesn’t solve your problem, check out my other post for additional help: Sending emails via SharePoint Designer workflow to external recipients using Gmail, Yahoo, Hotmail, etc. addresses

To “variablize” an email (this is using a SP 2010 platform workflow type):

1. Set a new workflow variable of type string to the email address(es) that aren’t receiving emails as expected.

Click to enlarge
Click to enlarge
Click to enlarge

2. Now in your email settings, use the “Workflow Lookup for a User” option and select your new variable from “Workflow Variables and Parameters” data source.

Click to enlarge
Click to enlarge
Click to enlarge

3. Publish the changes to your workflow and test.

SharePoint conditional column formatting with JSON: Beginner, intermediate, and advanced background colors example

I borrowed from Microsoft’s documentation on conditional column formatting recently to modify a modern experience list in SharePoint 2019. This also works for SharePoint Online/O365, but will not work in classic experiences (or pre-2019 server versions). I modified Microsoft’s example on conditional background colors for a numeric range and created a similar conditional column formatting result for text values.

In this example, I have a list for upcoming training opportunities. There’s a column named “Level” which is a choice field of either Beginner, Intermediate, or Advanced. The JSON code at the bottom of this post changes the column’s background color value to green, yellow, or red respectively based on the level selection. Here’s a demonstration of the result:

Click to enlarge.

You could modify this code to suit your own column’s values/options, then paste it into the Column Formatting section of that column’s settings (List settings > Select column from Columns section). Do not change @currentField in the JSON code – that’s just a reference to whichever column you add it to and doesn’t need to be your column’s name.

Click to enlarge
{  
  "elmType": "div",  
  "txtContent": "@currentField",  
  "style": {  
    "color": "#fff",  
    "padding-left": "14px",  
    "background-color": {  
      "operator": "?",  
      "operands": [  
        {  
          "operator": "==",  
          "operands": [  
            "@currentField",  
            "Beginner"  
          ]  
        },  
        "#2ECC71",  
        {  
          "operator": "?",  
          "operands": [  
            {  
              "operator": "==",  
              "operands": [  
                "@currentField",  
                "Advanced"  
              ]  
            },  
            "#E74C3C",  
            {  
              "operator": "?",  
              "operands": [  
                {  
                  "operator": "==",  
                  "operands": [  
                    "@currentField",  
                    "Intermediate"  
                  ]  
                },  
                "#F1C40F",""
              ]  
            }  
          ]  
        }  
      ]  
    }  
  }  
}

Auto-approval of Microsoft Teams Shifts requests using Power Automate

Today I happily stumbled across a collection of Power Automate templates for auto-approval of different types of Microsoft Teams Shifts requests, such as time off requests, open shift requests, and swap requests.

Not familiar with Shifts? Check out my write-up.

The ability to auto-approve removes the current reliance on a Team owner to approve requests. In less formal Teams, this would be an excellent improvement to speed up the process and give autonomy to your team members.

While most of the templates’ triggers are set to use “Recurrence” (regularly reviewing requests and approving on the hour), you can also create your own flow using Shifts itself as a trigger instead.

Note: In high-activity Teams, using Recurrence as the trigger might cut down the number of runs/flows you use if that’s a consideration for you. Using Shifts as the trigger as seen below will run every time a request is made, but provides a faster response to your users.

Click to enlarge.

The templates for Power Automate auto-approval of Shifts requests range from simple flows to more complex flows. Check them out below:

  1. Auto Approve Offer Shift Requests
  2. Auto Approve Open Shift Requests
  3. Auto Approve Swap Shifts Requests and Send Email Notification
  4. Auto Convert Shift to Open Shift
  5. Share My Shifts as iCalendar Feed
Auto Approve Offer Shift Request
Image taken from Auto Approve Swap Shifts Requests and Send Email Notification template example. Click to enlarge.