0

I have created a SharePoint site using stsadm.exe ( SharePoint command line administration tool ). The site has been created successfully. It can be browsed and the site administrator can log-in to the site.

Every other user which was added to site using the command below

stsadm -o adduser -url "http://test.sharepoint2013.com" -userlogin "LAB01\testuser1" -useremail "[email protected]" -role "Full Control" -username "Test User"

the user is added successfully into SharePoint site and the Roles/Permission Levels are also successfully assigned.

But the user CANNOT login to the site. It says "Sorry, this site hasn’t been shared with you."

I have verified the user has proper permission levels assigned and can be seen in site.

There is certainly no such problem in SharePoint 2010/2007.

Please guide. I ll be thankful to you!

Regards, Rizwan

8
  • 1
    Why are you using stsadm for this kinds of tasks in 2013, you should use powershell at all times possible if you ask me Commented Jul 17, 2013 at 10:04
  • Actully thats kind of a requirement. It is working fine for all versions of SharePoint except SharePoint 2013. Commented Jul 17, 2013 at 10:27
  • My guess would be that stsadm does not handle Claims Based Authentication as good as powershell, and hence adds a user that can not login (due to a mismatch in userlogin, and actual user login, witch will have a claims token first) Commented Jul 17, 2013 at 10:29
  • Yea you might be right, but I have been using stsadm for SharePoint 2010 and 2007, there hasn't been a problem before. Moreover I have assigned roles through SharePoint API as well. Commented Jul 17, 2013 at 10:56
  • 2010 nor 2007 had Claims as default authentication method. What do you mean with API? Commented Jul 17, 2013 at 10:58

3 Answers 3

1

Why are you using stsadm for this kinds of tasks in 2013, you should use powershell at all times possible if you ask me.

My guess would be that stsadm does not handle Claims Based Authentication as good as powershell, and hence adds a user that can not login (due to a mismatch in userlogin, and actual user login, witch will have a claims token first)

0

Refer this site for "Sorry, this site hasn't been shared with you"

http://www.falconitservices.com/support/KB/Lists/Posts/Post.aspx?ID=112

http://community.spiceworks.com/topic/341758-sorry-this-site-hasn-t-been-shared-with-you

2
  • While this might very well be an answer we prefer it you extend your answers to more than just a link. Can you add some steps and reasoning from the links to your post? :) Commented Jul 17, 2013 at 10:21
  • I have gone through above links, but my problem is that I am assigning roles through admin utility (stsadm) and these roles can be seen from SharePoint site. But even after that the site shows the above mentioned error. I also tried to assign roles/permission through SharePoint API but problems still persists. Commented Jul 17, 2013 at 10:30
0

Its the opinion that 'stsadm' (SharePoint Admin Utility) does not handle the Claim Based Authentication well. When we create user through stsadm, it is not allowed to login to the site in SharePoint 2013. So what I did is:

Created user through SharePoint API (SharePoint.dll).

using (SPWeb web = site.OpenWeb())
{
  SPUser oUser = web.EnsureUser(UserLogin);
}

And it worked fine. You can also create user using PowerShell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.