12/28/2012

Fun and Games with Site Collection Administrators

 

SharePoint has three kinds of Site Collection Administrators: Primary, Secondary and "other". When you edit the list of admins in Site Actions, Site Settings there is just a list of admins with no indication of kind. So who is the Primary? What happens when the list is edited and the Primary and / or Secondary is removed? Then who's the Primary?

This article has two parts:

  • Background on Site Collection Administrators
  • Weird Fun and Games

I did my testing in SharePoint 2010, but expect similar results in both 2007 and 2013. I'll test those when I get a chance.

Background

A Site Collection Administrator is:

  • a user assigned to the SPSite.Owner property. They are displayed in Central Administration as the "Primary site collection administrator".
  • a user assigned to the SPSite.SecondaryContact property. They are displayed in Central Administration as the "Secondary site collection administrator".
  • a user added in Site Actions, Site settings as a site collection administrator. They are not displayed anywhere in Central Administration. They are added in the site using Site Actions, Site Settings, Site Collection Administrators. (Both these admins and the Primary and Secondary admins have their SPUser.IsSiteAdmin property set to true.)

What makes them special:

  • All Site Collection Administrators have full control over the entire site collection and can see all content. (unless limited by Central Administration, Applications, User Policy)
  • Only the Primary and Secondary admins receive administrative email alerts for the site collection (Quota exceeded warnings and Site Use Confirmation and Deletion notices)

Finding them with Central Administration

image

Finding them with Site Actions, Site Settings

image

Finding them with PowerShell (just the Primary and Secondary here:

$site = get-spsite http://sharepoint/sites/training
$site.Owner
$site.SecondaryContact

Or for all Site Collections in a web application:

Get-SPWebApplication http://sharepoint | Select -ExpandProperty sites | Select url, owner, secondarycontact | ft -AutoSize

Now for the Fun and Games!

I created a new site collection and assigned:

  • Primary Site Collection Administrator (Owner):  susanj
  • Secondary Site Collection Administrator (SecondaryContact):  samc

I confirmed the admins in:

Central Admin:

image

Site Actions, Site Settings:

image

PowerShell:

Get-SPSite http://sharepoint/sites/test1 | select url, owner, secondarycontact

Url                           Owner             SecondaryContact
---                           -----             ----------------
http://sharepoint/sites/test1 SHAREPOINT\susanj SHAREPOINT\samc

 

Now I add two more Site Collection Administrators from Site Actions, Site Settings:

image

No change in Central Administration as these new admins are not the Primary/Owner or Secondary/SecondaryContact and have been added as "other site collection admins". (Their IsSiteAdmin property has been set to True.)

For PowerShell we need to add one more request to get the list of "other" admins (IsSiteAdmin=true)…

$site = Get-SPSite http://sharepoint/sites/test1
$web = $site.RootWeb
$web.AllUsers | Select UserLogin, IsSiteAdmin 

UserLogin                IsSiteAdmin
---------                -----------
SHAREPOINT\samc                 True
SHAREPOINT\administrator        True
SHAREPOINT\stellas              True
SHAREPOINT\susanj               True
SHAREPOINT\system              False

So now I have:

  • Primary Site Collection Administrator (Owner): susanj
  • Secondary Site Collection Administrator (SecondaryContact): samc
  • Additional admin: stellas
  • Additional admin: administrator

 

Now for the fun…

I logged in as Stella and then using Site Actions, Site Settings I removed sam and susan (the Primary and Secondary). So who is now what?

  • Primary Site Collection Administrator (Owner): stellas
  • Secondary Site Collection Administrator (SecondaryContact): none!
  • Additional admin: administrator

Then I added susan and sam back:

  • Primary Site Collection Administrator (Owner): stellas
  • Secondary Site Collection Administrator (SecondaryContact): none!
  • Additional admin: administrator
  • Additional admin: samc
  • Additional admin: susanj

I then tried all kinds of combinations of adding and removing admins from Site Actions, Site Settings and from Central Admin.

Learnings

  • There are two kinds of Site Collection Administrators: the ones who receive site event emails, and all of the rest. Except for the emails, they all have the same permissions.
  • The order of site collection administrators in Site Actions, Site Settings does not tell us who is the Primary or the Secondary. The order is simply the order the users are found in the SPWeb.AllUsers collection, sorted by DisplayName. There is no way to find out who the Primary or Secondary is except for Central Administration and PowerShell.
  • If a Primary Site Collection Administrator is deleted from Site Actions, Site Settings, a replacement is automatically selected using the first person found in order by ID. (ID's are assigned in the order users are added to the site collection. First user is ID #1, etc..)
  • If a Secondary Site Collection Administrator is deleted from Site Actions, Site Settings, a replacement is not automatically selected. A Secondary Site Collection Administrator can only be added from Central Administration or by using PowerShell.

Obvious, right?

 

.

 

 

 

 

 

 

 

 

    a

12/23/2012

SharePoint: Use my local drafts folder

 

Update: In SharePoint 2007 the "Use my local drafts folder" checkbox was checked by default. In SharePoint 2010 and 2013 it is not checked by default. Turns out that this is an Office default and not a SharePoint default and can be changed from the Options screen of Word or Excel. See here for how to change this default: http://techtrainingnotes.blogspot.com/2013/03/sharepoint-change-default-for-my-local.html

When checking out a document SharePoint 2007 and later offers an option to automatically download a copy of the file to your local machine.

    image

Selecting this option will download the file to your computer into a SharePoint Drafts folder inside of your My Documents folder.

    image

When you later check in the document, SharePoint will automatically upload the file from the SharePoint Drafts folder. The file is also automatically deleted from the drafts folder. The file will also be deleted if you Discard the Checkout.

image

If you cancel the upload you will also cancel the check in.

So far, a very hand feature!

 

There is an unexpected side effect of the "Use my local drafts folder" option…

  • Check out a document with the Use my local drafts folder option
  • Later return to the library and download the document
  • Edit the downloaded file and then upload back to the library
  • When you later check in the file, the copy of the file downloaded to your drafts folder will be uploaded, overwriting your previously uploaded file!

 

What about Security?

Just something to think about… do your users know what's in their draft folders? Is there any content getting downloaded into laptops and forgotten about?

 

.

12/22/2012

Weird problem with SharePoint Designer workflows and Office 365

 

I wanted to add a quick little workflow to a SharePoint Online / Office 365 (2010) site using SharePoint Designer 2010. When adding the workflow all I got was a blank screen.

My steps:

  • Open SPD 2010 and open the Online (2010) site
  • Click Workflows, click new List Workflow, select my list, enter a title and description, click OK
  • and…  nothing… no workflow editor, no error message, just a blank workflow list

                           image

Note that this was a SharePoint Online 2010 site, not a 2013 site.

The fix?

Create the workflow using SharePoint Designer 2013! SPD2013 can create both 2010 and 2013 style workflows, but when used with a 2010 site it can only create 2010 style workflows.

Here's the KB:

You have problems with workflows or receive errors in SharePoint Designer 2010
http://support.microsoft.com/kb/2794961

.

12/19/2012

CincyPowershell with Microsoft IT Pro Technical Evangelist Keith Mayer

 

Reminder for Cincinnati area PowerShell nuts!

Thursday, December 20, 2012, 6:00 PM at MAX

On December 20th, we will be joined by special guest speaker Microsoft IT Pro Technical Evangelist Keith Mayer. For this event, he will be speaking on Hyper-V and PowerShell. To learn more about Keith, visit his blog at http://blogs.technet.com/b/keithmayer/. We want to give Keith a great event too, so spread the word!

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.