Solved

Add claims based secondary site collection admin Sharepoint 2013

Posted on 2016-09-09
7
36 Views
Last Modified: 2016-09-27
Claims based authentication for application is working and i can add claims to sharepoint group, but can i configure claims secondary site admin. I have tried but gives me error that it can't find user, see the attached screenshot.
2016-09-09-10_31_15-Clipboard.jpg
0
Comment
Question by:oompaloompa
  • 5
  • 2
7 Comments
 
LVL 14

Accepted Solution

by:
SneekCo earned 500 total points
ID: 41791388
Grant User Site Admin Privileges
The following PowerShell code can be used to promote a user to be a site administrator for a site collection. This should be run in the context of an account that has permission for this change.

$Web = Get-SPWeb http://webapp.com/sites/users-site
$User - Get-SPUser -Web $Web -identity "i:05.t|saml provider|username@webapp.com"
$User.IsSiteAdmin=$true
$User.update()

Here are few other checks that can be run to assist the process:
After getting the web object with Get-SPWeb, check the claim string by using $Web.SiteUser with a filter, as shown here:

$Web.SiteUsers | ?{$_.UserLogin -like "*username*"} | ft -a

The results of that query shows the string which can be used in the Get-SPUser cmdlet. (Copy and paste save some typing and can be more accurate.)

It is also possible to confirm that the user is a site admin by using this line in the appropriate location:

$User.IsSIteAdmin

(Results will be true of false.)


Hope that helps...
0
 

Author Comment

by:oompaloompa
ID: 41792281
User doesn't exists in SP, it is not a domain user so i can't resolve it, i get returned claims for the user

"Get-SPUser : You must specify a valid user object or user identity.
At line:1 char:9"

2016-09-10-09_23_48-.png
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 41792661
If the user is not in SharePoint, then you cannot add as a site admin. If the user is not a member of the domain, unless you have some type of authentication mechanism for the user, you can't add to SharePoint.

What you want to do may not be possible to do.

Good luck...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:oompaloompa
ID: 41793943
i have authentication mechanism outside of sharepoint, users are redirected to authenticate and then redirected back to sharepoint.

So there is no way to add secondary site collection admin based on claims that i got returned from third party sts ?
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 41794080
Yes, if SharePoint sees it as a user when it comes from the third party sts, you can do anything you want with it in SharePoint. If it is not seen as a user then you can't do anything with it. If powershell can't find it, then maybe it is not being passed from the sts provider correctly or as you think it is. Make sure you are using the same user name and claims string that the sts provider is passing.

Good luck...
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 41800916
Any luck?
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 41817783
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now