Category Archives: SharePoint

An o365 Support case that was handled so quickly, I had to write about it!

I was so impressed with how fast this was turned around, I had to write about it…

A special shout out to Microsoft Sr. Escalation Engineer Sridhar Narra and the support team including Linda PorcelliLoren Jacobson and Tiffany Evenson who worked to resolve this issue so quickly!

Apparently in email addresses, the single quote is a legal character.

So names like: Bill.O’Brian@yourcompany.com are legal in the email sense.

Addresses like this can cause havoc on programmers.

Well it turns out that we had a few people like this in our company and this did not play well with Office 365 at all.

The first, and easiest thing we noticed was that if you found a person like Bill O’Brian in search and tried to click on them, the profile page for the user threw an error.

We opened a case with Microsoft and I was expecting something short like “Don’t use quotes in your email” but instead, they looked into and fixed it. FAST.

I’m used to changes in o365 taking 3 months to make it from ticket to production, this one took a few weeks, from the time we opened the ticket, to the time the issue was resolved in production.

This is a pace of improvement and change I’ve not seen until now and it’s really exiting to see things get fixed this quickly!

A special shout out to Microsoft Sr. Escalation Engineer Sridhar Narra and the support team including Linda Porcelli, Loren Jacobson and Tiffany Evenson who worked to resolve this issue so quickly!

As a side note, a  quotation mark in an email address has issues in other places of SharePoint. Our case was split into several cases. Sridhar’s team worked on the profile page, There’s another team looking at another case which I’ll update in the future when I have more information.  If your organization has issues similar to this, please open a premier ticket.

– Jack

 

A quick update on where I’ve been…

I noticed today that I haven’t posted anything in a while here- notably the entire month of August. That’s partly due to vacation schedules in the summer – I went on a family vacation then went to Laracon for 4 days in Kentucky to learn more about PHP the programming language that powers more websites in the world than any other language. (Like 81%!)

Investing in On premise SharePoint today feels like putting new tires on a car you’re going to junk in 2 months.

Another reason though, is that as we move to office 365, my job role is changing. It’s been a good year now since I’ve built up a new on premise farm for work, and even the announcement of SharePoint 2016 on-premise doesn’t really excite me.  It appears that on-premise has a limited future, and the cloud is the direction of the future, not just for SharePoint but for lots of technologies.  Investing in On premise SharePoint today feels like putting new tires on a car you’re going to junk in 2 months.

So as I work more with o365 and less with on premise, the issues I face are different.  In August I created a series of 20 or so SPO training videos and put them up in the Office 365 video portal (that I’ll be talking about in my talk at SPSTC in October) That took a good part of my free time.

I’ve spent a lot of time opening issues with Microsoft. Today I have a success story to share, which I’ll post separately on. I believe I have another success story coming in Late October that’s HUGE for the SharePoint community, and critical for the migration to o365 from on premise.

As always, thanks for stopping by!

 

New SharePoint Online PowerShell Update!

I just noticed this in the “Message center” area of our o365 admin site:

We’re making some changes to SharePoint Online
Details
Starting today, we have updated the Get-SPOTenant and Set-SPOTenant cmdlets to allow administrators to hide the “Everyone”, “Everyone but external users”, “All Users (windows)”, and “All Users (membership)” default claims in People Picker.

Click the Additional Information link below to download the latest version of SharePoint Online Management Shell to use the updated cmdlets.

“Additional Information Link”

 

O365 Sites/SharePoint Online tip: Save time editing Search settings

You can edit the url manually and avoid using the Filter UI to find the property you need to edit

If you’ve tried customizing search in Office 365, Specifically in dealing with Managed properties, you know it can take a lot of time going back and forth to the managed Properties page, and then using the filter to search for the property you need.

This is even more grating when you have to customize the “Refinable”s because there are so many of them (you can’t just filter  on ref, you have to type in RefinableStringxx)

This time saver might fall under the ‘obvious’ category, but have a quick look at the URL – you can easily jump from one Managed Property to another, by just altering the URL:

Note that you still need to click OK, which takes you back to the main screen, so I just copied the URL before I did that, then pasted it in, and typed over the property name to get the one I wanted.

refinablestrings

Script for Auto-Adjusting Site quotas in SharePoint Online / O365 based on current useage

** IMPORTANT UPDATE #2 -this is no longer needed.

As of September 2015, Site Quotas are no longer needed!

The screenshot below came from our tenant settings screen – Set it to Automatic and forget about site quotas!

AutoStorageSPOnline

** IMPORTANT UPDATE RELATED TO SHAREPOINT / OFFICE 365 VIDEO SITES ** (Updated April 29th 2015)

If you use the script below, you may want to put in a filter to prevent the script from working on any site with the managed path of /portals/

Explanation:

Microsoft recently added Video portals to office 365.

Ours was added this morning.

I looked at it in the admin screen because I was curious what site collections had been created.

I noticed something peculiar: The Storage Quota was 0.

2015-04-29_17-34-23

You can’t set a quota to zero. Not in the UI, not in PowerShell.

Well tonight my script ran and guess what, it reset my quote on the Video portal.

Originally, Video portal storage was supposed to come out of the overall SPOnline allotment, so this may not be a big deal, maybe we needed to set it anyways?

But, since it’s not possible to set zero manually, I wonder if this was one site you didn’t have to manage/pre-allocate storage too? Or maybe MS decided to make storage unlimited?

I’m not really sure, but in the short term, I thought I’d best warn people that there are some unknowns here as it relates to using the below script with Office Video.

 

AND NOW BACK TO OUR ORIGINAL ARTICLE, as it was published on April 15th:

The year is 2015, You’ve just been given “TONS” of storage on SharePoint online, and someone says “Lets give everyone a 200GB site quota”.

Seems like a great idea, you’ll never run out of space, so why not set the limit high?

Well, it turns out, the word “Quota” has a different meaning in SharePoint Online / Office 365 than it did in SP on Premise.

In the On Premise version of SharePoint, the quota was a limit.
In SharePoint Online, it’s an Allocation.

What’s the difference you ask?

Say you have a 1000GB of storage on SharePoint on premise.

With On premise SharePoint, you can allocate a 200gb quota to 10 sites, “over committing” what you actually have. It works because space isn’t ‘reserved’ for that site, it’s just a limit. You’re telling on premise sharepoint “Don’t let any site get bigger than 200gb”.

Take a similar situation on SharePoint Online:

Say you have 1000GB of storage on SPO

You can only allocate 200GB quotas 5 times – each time you do, your total available drops by 200GB so by the 5th one, you have nothing left to give. This is true, even if the sites are empty!

So SharePoint online works a little differently, at least in 2015 it does – maybe one day this article won’t be relevant, but it is today.

What are we to do if we want to give users basically unlimited sized site collections

Now the question: What are we to do if we want to give users basically unlimited sized site collections, but we can’t allocate large numbers to EACH site collection?

Well, here’s what I did – I wrote a script that looks at how much storage each site collection is using, then adjusts it so there is a certain amount of ‘headroom’.

I run the script daily via a scheduled task.

I also have another script that sets up the connection to SharePoint Online which runs first, if you need that part, it’s elsewhere on this site.

The logic is fairly straightforward, but lets do an example:

All sites should be 4GB or more over the size used:

  • An empty site would have 4gb allocated
  • A site using 3gb would have 7gb allocated
  • A site using 10gb would have 14gb allocated.

Make sense?

That logic is pretty simple, take the size of the site, add 4gb to it, that’s it’s allocation.

For performance reasons, it would be great if we weren’t constantly adjusting each and every site, every time we run the script, the $slack setting helps with that.

Here’s the script:

(If you need help scheduling a task, I have a blog post and video here about that. )

– Jack

Script for assigning SharePoint Licenses to Office365

Adding SharePoint licenses to Office 365 can be a bit tricky.

If you add the E3 license, you get EVERYTHING that comes with E3, if that’s what you need, great, but what if you ONLY want SharePoint, and not Lync, email, etc??

I ran into this recently and used a few resources to come up with a script.

This article was really helpful:  http://www.powershellmagazine.com/2012/04/23/provisioning-and-licensing-office-365-accounts-with-powershell/

As was some script work by an awesome guy I work with named Chris.

The tricky thing here is you can’t directly grant just a SharePoint license in MSOL E3…

You have to do it subtractively.

Let me explain…..

Say you have 3 letters, A, B & C

You might expect to add a license for b like this:

Add-license -option B

It doesn’t work that way. (At least not in 2015 when I wrote this)

Instead you have to say:

Add-License -disable A C

No problem you say.

“I’ll just add code to disable A C”

That’s great, until….

Microsoft adds Option D

Now, when you try

Add-License -disable A C

You’ve just assigned a B and D license, when you only wanted to assign a B license.

Now you see the issue….

The solution is not too hard – we can pull a list of all options available, remove the one we want, and then build the disable list from that.

This way we won’t get caught when Microsoft springs options EFGHI on us.

The full script is below.

Note: there are some unused functions in the script for setting a password – if you have brand new users to Office 365, they may never have used their identity and will need the password reset and sent to them, if that’s the case, just add the call to Reset-Password -upn $upn at the appropriate place(s)

Here’s the script:

 

Create a ShareGate User mapping file between on Premise AD and o365 / Azure AD

We use ShareGate to migrate content.

We recently started using ShareGate to migrate content from On Premise to SharePoint Online.

When I did this, I found that one of our domain’s users kept showing up as errors in ShareGate – it said it could not find the user in SharePoint Online.

ShareGate has a nice feature for mapping users from one system to users in another – but doing this manually to any scale would be pretty time consuming.

Thankfully, ShareGate lets us save the mappings, which are just XML files with a .sgum file extension.

Wouldn’t it be great if there was a way to automate creating a mapping file like this for everyone in the domain at once?

Have a look at the script below, it pulls all the user accounts from an OU in AD, then looks up each user to find them in MSOL (Office 365 Azure AD) Then grabs the o365 display name and makes the mapping . Any user not found is logged so it can be dealt with separately.

The whole thing is written out as a complete .sgum file, ready to import into ShareGate the next time you migrate!

Note I didn’t figure out the XML stuff in a vacuum – I found an article on powershellmagazine.com to be very helpful and noted it in the script.

– Jack

Add a person as a site collection administrator to every Office 365 Site / SharePoint Online Site Collection

The Problem:

In SharePoint online (at least as of early 2015) site collection administrators have to be granted on a site by site basis.

When you create a new site collection using  https://yoururl-admin.sharepoint.com, you are only allowed to pick ONE administrator for the Site collection (In on premise, you used to pick two)

NewSiteCollectionSPOdialog

Now a little trick you can use is, after the site collection is created, you can check the site collection then click the “owners” tab:

SPOadminBar

and from that screen you can add as many site collection administrators as you’d like:

AddSPOadminDialog

 

But there is a downside, you can’t “select all” on all your site collections and add a user to all site collections at once.

Now, I hear you saying “Jack: What if I have 500 site collections and we add a new member to our team?” There’s got to be a better way, right? And it turns out, there is.

The Solution: PowerShell…

A Quick note before we get to the script: You’ll need the SharePoint Online Management Shell installed on your PC before this will work.
Here’s a quick overview of how to use the script:

Update all the relevant variables:

  1. Admin site URL ($adminurl), and the $username that has permissions to log into the admin site url to make the change.
  2. put in your $tenantURL
  3. Update the list of $SiteCollectionAdmins with the list of users you want to make site collection admins

Run the script.

When you run the script it will try to logon to your SPO account and will prompt you for your SPO password, then you should see some slow and steady progress as it runs through each site collection. Finally, at the end you can review the log file to see if there were any issues.

The Script: