Question

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 "testuser@sp2013.com" -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

Was it helpful?

Solution

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)

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top