InfoPath publishing error in SharePoint Online

When trying to publish a list form customized using Microsoft InfoPath to SharePoint Online, you get the following error:

“You do not have the required SharePoint license to publish browser forms to the following location…”

To resolve this error, add the following entry in the registry:

Navigate to

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Common\Identity 

Create a new DWORD entry called “EnableADAL”

Set its value to 1

Acknowledgements: A big “thank you” to Dhejo Prothasis for figuring out this fix.

Office 365 storage utilization alerts with a Power Automate workflow

What happens when you run out of Office 365 storage? In some high-end Office 365 licensing plans, Microsoft will allow you to temporarily to exceed your storage quota until you purchase additional GBs. And for the rest of us? You will be abruptly cut off and your users will be greeted with an annoying message saying that the site has been placed in read-only mode. You’ll get a nasty-gram below saying that you’ve run out of storage and you need to buy more storage ASAP. Panic ensues…

Note: This message can also be generated when your SharePoint site collection reaches its quota. See more details here.

So how do we avoid this aggravating situation? With a Power Automate workflow.

Here I will share the tricks how to do it, because as I found out, there is no clear and documented method or API how to accomplish this.

The hardest part was to find out how to get into the Power Automate Flow the information about the maximum and the used storage quota. In the hope this will save you some time, I am sharing my findings, made after sniffing the network communication on the SharePoint admin center page that is showing this info. It seems there is an internal REST API, which gives this information (but I could not find its documentation). This REST GET call has the URL:

https://%5Btenant%5D-admin.sharepoint.com/_api/StorageQuotas()?api-version=1.3.2

NOTE: Authenticate with admin user that has permissions to see the SharePoint Admin page.

This REST method returns an XML or a JSON structure, depending on request. Our Flow will use the Action “Send an HTTP request to SharePoint”, requesting a JSON response, which looks like:

{

  “d”: {

    “results”: [

      {

        “__metadata”: { … },

        “GeoAllocatedStorageMB”: “0”,

        “GeoAvailableStorageMB”: “1073117”,

        “GeoLocation”: “NAM”,

        “GeoUsedStorageMB”: “16419”,

        “QuotaType”: 0,

        “TenantStorageMB”: “1089536”

      }

    ]

  }

}

The interesting info is “TenantStorageMB” and “GeoUsedStorageMB“. From them you can calculate the used quota percentage.

The Flow I built contains the following actions:

Then I am using a Condition to check if the used quota has reached my configured percentage and if it did send I use a send email action to inform the SharePoint Administrator and use the variables from the flow to compose a useful email:

Note: This Power Automate workflow needs to be created by a SharePoint user who has administrative permissions to be able to call the SharePoint REST API.

This workflow will execute once every day and if the storage quota is met, it will send out an email notification, like this one:

To download a copy of the workflow package, click here.

ACKNOWLEDGEMENTS:

A big thank you to Alex Baumgarten for his tremendous skills in developing this workflow and solving the technical challenges during its development. If you need a similar Power Automate workflow built, please contact Alex here.

Recover SharePoint 2013 installation key

I was reinstalling SharePoint 2013 Server in the lab tonight and discovered that I didn’t have the original license key that it was installed with. Googled online and found a number of Powershell scripts that claim to recover the key from the registry, but none of them worked – except this one, which was originally posted as a comment by KEMiCZA here. I can confirm that it worked for me.

This one should work SP-2013
function Get-SP2013ProductKey {
$map=”BCDFGHJKMPQRTVWXY2346789″
$value = (get-itemproperty “HKLM:\SOFTWARE\Microsoft\Office\15.0\Registration{90150000-110D-0000-1000-0000000FF1CE}”).digitalproductid
$baseAddress = 808
$needsN = ($value[$baseAddress + 14] -shl 3) -and 1;
$ProductKey = “”
for ($i = 24; $i -ge 0; $i–) {
$r = 0
for ($j = 13; $j -ge 0; $j–) {
$test = $value[$baseAddress + $j]
$r = ($r * 256) -bxor $value[$baseAddress + $j]
$floor = [math]::Floor(double)
$value[$baseAddress + $j] = $floor
$r = $r % 24
}
$ProductKey = $map[$r] + $ProductKey
}
if($needsN)
{
$firstLetterIndex = 0
for ($i = 0; $i -lt $ProductKey.Length; $i++) {
if($ProductKey[0] -eq $map[$i])
{
$firstLetterIndex = $i
break
}
}
$ProductKeyWithN = $ProductKey = $ProductKey.substring(1) # Remove first character
$ProductKeyWithN = $ProductKeyWithN.SubString(0, $firstLetterIndex) + “N” + $ProductKeyWithN.SubString($firstLetterIndex)
$ProductKeyWithN = $ProductKeyWithN.SubString(0, 5) + “-” + $ProductKeyWithN.SubString(5, 5) + “-” + $ProductKeyWithN.SubString(10, 5) + “-” + $ProductKeyWithN.SubString(15, 5) + “-” + $ProductKeyWithN.SubString(20, 5)
}
$ProductKeyWithN
}
Get-SP2013ProductKey

SharePoint 2013 Hidden User List

<sitecollectionurl>/_layouts/15/people.aspx?MembershipGroupId=0

Powershell script to export BDC models from SharePoint

This Powershell script exports Business Data Connectivity (BDC) service models from SharePoint.

# Get list of of all bdc models

$bdcs = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType “Model” -Name * -ServiceContext http://sharepoint

foreach($bdc in $bdcs)
{

# create a unique file name using the bdc name

$path = “.\$($bdc.DefaultDisplayName).bdcm”

# fetch the BDC object

$Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType “Model” -Name $bdc.DefaultDisplayName -ServiceContext http://sharepoint
Export-SPBusinessDataCatalogModel -Force -Identity $Model -Path $path

}

This script was developed by Dhejo Prothasis, Lead Architect at Acquiresoft Solutions.

Animated Title Banner in SharePoint Modern site

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Hello there! This is Danielle Lissak invading my friend The SharePoint Nomad’s blog to share some SharePoint tricks with ya.  We recently had a client that really wanted a sort of slideshow in the header block of their corporate portal page.  I was unable to find a way to do this within the features currently offered on the SharePoint modern site so I was left to my own devices.  Here’s how I managed to mimic the look of a slideshow or rotating banner on the client’s site with an animated gif.

I’m not going to go into how to create an animated gif since this is a SharePoint blog, but there are many programs out there to do so.  I used PowerPoint to create this one because I already had it and I’m cheap. 

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Depending on how you want it to appear, you may need to size your gif so that it fits the space at 100% scale.  This way, you can control the height of the banner and minimize stretching/zooming. 

Once you have your gif you can add it to your SharePoint page just as you would any other image.  However, adding it to the banner block the standard way may cut off a part of your image as shown below.  And although you can’t tell here, it is animated!

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

This may work well for your project but in this case, it did not suit my client’s needs. 

The work around is to delete the existing webpart.  In the case of the Communications templates, delete the Hero webpart to get the menu shown below.  Then just choose the Image option and proceed to insert the image as you normally would.

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Now pat yourself on the back because you’re done! 

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Did I miss something? Let me know in the comments and I’ll add it in! 

Keep on keepin’ on,

Danielle Lissak

SQL Server 2012 Service Pack install fail

Problem description

Installing SQL Server 2012 Service Pack 3 update, and ran into the following problem:

The install package extracts setup files, flashes a command window, and disappears.  Nothing appears to be installed.  I tried running the package in elevated administrator mode and with the /action=Patch switch – no luck. SQL Server setup log Summary.txt contained no entries at all.

Windows Application event log showed some warnings such as the screenshot below:

NETerror

(.NET Runtime version 2.0.50727.5485 – Error ‘Invalid syntax on line 166’)

Solution

This problem was fixed by running the following command:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol.exe    

-machine   -reset

If you’re using 64-bit framework, run the following command:

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol.exe  

-machine -reset

 

No system reboot was required in my case.

Some thoughts about OneNote…

I am an avid OneNote user.  I’ve been using Microsoft OneNote for several years, and it’s a must-have application for me.  It helps me stay organized amid the chaos of competing priorities, fast-moving projects, and a busy family.   In the meantime Microsoft has been making serious investments into OneNote, making it available across several mobile platforms and integrating it with OneDrive and SharePoint Online.  The OneNote user experience is now quite smooth between mobile and desktop, and the value proposition for OneNote has never been greater.

At the same time, when I look around I see that many individuals and organizations have access to OneNote (it comes preinstalled with several flavors of Microsoft Office and the mobile app is free).   However, they’re not using it to capture notes or organize their information.  They’re not using a competing product, either.  For most people, pen & paper is still the preferred method for taking notes.  Information arriving electronically is captured in email or in folders or documents which makes it difficult to find information and keep it updated.  For many people, things that they know or want to keep are spread across multiple sources and repositories, and it takes a lot of mental effort to find and retrieve information.  Old habits die hard, I suppose…

Our mission here at ITKM Systems is to help our clients capture and organize their informal knowledge assets.  OneNote provides a great platform for accomplishing this goal.  Over the next few months, you will see some new content on this blog related to how to leverage OneNote for best results and achieve maximum productivity. We will be spending more time with OneNote, figuring out the best layouts, the best templates and the best ways to capture, organize, and retrieve your knowledge.

SharePoint Powershell Move-SPSite error: Invalid object name

Attempting to move a SharePoint site using Powershell cmdlet Move-SPSite and getting the following error:

Invalid object name ‘WSS_Content.dbo.AllSites’.

This error occurs because the database schema between the source database and the target database is different.  In my case, the source database was hosted on SQL Server 2008 R2, and the destination database was on SQL Server 2012 SP3.  I solved the problem as follows:

  1. Create a new content database on the source SQL Server.
  2. Use Move-SPSite cmdlet to move your SharePoint site into the new DB.
  3. Using SQL Server Management Studio, back up the new content DB to a file and copy it to the destination SQL Server.
  4. Restore the database on the destination SQL Server.Move-SPSite

Malaysia Airlines flight MH17 tribute

Ok, so this is not going to be a SharePoint or technology-related post..   Two days ago, a Malaysian Airlines flight Mh17 was shot down over eastern Ukraine by pro-Russian rebels.  This strikes close to home for me because I was born in Kyiv, Ukraine, and emigrated to the U.S. in 1991.  I’ve been following the news of the crash (and prior to that, the proxy war that Russian has been waging in eastern Ukraine).    I put together a video tribute to the victims of this awful tragedy – see links below.   As one U.S. intelligence official put it, “Let’s hope that this leads Vladimir Putin to a moment of sanity.”   Our prayers are with the victims and their families..

 

Malaysia Airlines MH17 Tribute

Vimeo (All locations):    https://vimeo.com/101144961

YouTube (Only viewable outside of the U.S.):    https://www.youtube.com/watch?v=sITF8mje0aI

 

 

 


RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Bud Ratliff blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 401,842 hits