Gino Abraham's Blog

sharepoint 2013

Custom Role Claim Based Authentication on SharePoint 2013

We had a requirement in a project to authenticate users in a site collection based on Country claim presented by a User.Below powershell sample is to add a US country claim value to a Visitors group of a site collection to allow any users from US to get authorized to view the site.$web = Get-SPWeb "https://SpSiteCollectionUr... = New-SPClaimsPrincipal -TrustedIdentityTokenIssuer “users” -ClaimValue “US" -ClaimType “http://schemas.xmlsoap.org... = $web.Groups[“GDE ......

Powershell to monitor Server Resource and make html report for a set number of iteration and intreval

While building a SharePoint farm for a project, i did load testing with VSTS.Since my SharePoint farm was in a different domain than that of my Load test controllers, I had to monitor few performance counters to take a well informed decision while tuning the farm capacity.Below powershell was developed by me to generate a html report for all the different servers at specified intervals.The output html file will be generated in D Drive. #Array which contains the different Server names$ServerList = ......

Powershell to make User Principle Name (UPN) of SharePoint user profile service editable

Use the below script to make the UPN updatable.This was handy incase of Site minder configuration for SharePoint where in there was no profile sync in place and a profile was provisioned as and when the user logs in for the first time.Without UPN Sp2013 workflows and App will not work, we wrote a module to capture the first time login and updated the UPN with the identity claim under the same user's session.$siteurl = "http://SPWebAPP:PortNo"if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerS... ......

Error: feature with ID is not installed in this farm and cannot be added to this scope

While working on a SharePoint 2013 development server which is a multi server farm, we will face issues in doing auto deployments from visual studio. There is a workaround for the same posted here. http://www.youvegotcode.com/2014/11/error-feature-with-id-is-not-installed.html

Sharepoint 2013 - Sorry, only tenant administrators can add or give access to this app

If you get an error "Sorry, only tenant administrators can add or give access to this app" while adding your app to your site collection, you can add yourself as a local admin on the box not through some group rather user id under the administrator. This is a temporary fix suggested by MS. Hope something will come up or has already come up.Mine is an Aug CU ......

Powershell to Migrate users from One Authentication provider to other in SharePoint

We recently had a project in which we had to migrate a SharePoint farm from Siteminder-Custom STS authentication to ADFS 3.0Siteminder - is a SAML Single Sign on Solution used by my customer which will authentication a user against any of the ID provider(Enterprise directory in our case) and will send SAML 2.0 back to the trusted applications. Since SharePoint doesnt understand SAML 2.0, they have used a Custom STS built on Asp.net to do the transformation for SAML 2.0 to SAML 1.1 and send back the ......

SQl Query to check whether User Principal Name is Blank in SharPoint User Profiles DB

User Principal Name /UPN is a property which is mandatory in SharePoint 2013 for Workflows and Provider Hosted Apps to work fine. When you employ a third party profile sync tool or a custom built one, the below SQL query will be quite handy to check whether the User Principal Name property is populated or not. SELECT dbo.UserProfile_Full.UserID, dbo.UserProfile_Full.NTName, dbo.UserProfileValue.Proper... dbo.UserProfile_Full WITH (NOLOCK) INNER JOIN dbo.UserProfileValue WITH (NOLOCK) ON dbo.UserProfile_Full.Partit... ......

Reporting Service Sharepoint Integrated mode on SP2013

For many reason we reconfigure the SharePoint Development or PoC farm. I had SSRS configure on my Single server farm initially. Due to some issues i had to recreate the farm by running the SP configuration wizard. After new installation i was trying to setup SSRS on SharePoint 2013. I was not getting the new service application creation option though the Reporting Service and the reporting service add-in was already installed.After some heart burns i got to find that my SSRS service was in disabled ......