Posts

Showing posts from September, 2016

Client Web part using SharePoint Provider Hosted Add-in/App

Image
In this post I will explain the process to create the client web part/Add-In part using SharePoint Provider Hosted Add-In model and read the available lists in the current site. For this project, you need Visual Studio 2015/2013 with Office Developer Tools installed and SharePoint Developer site. You can get a SharePoint developer site using an ‘Office 365 Trial’ subscription. Create a New Project in Visual Studio 2015/2013 and select App for SharePoint 2013 or SharePoint Add-In template. Click OK. Enter the developer site collection URL and select Provider hosted Login to Office 365 site, Here I am using Office 365 Now the solution will be created with the ‘SharPointClientWebPart’ and the ‘SharePointClientWebPartWeb’ projects. Right click the ‘SharePointClientWebPart’ project, Add ‘New Item’ and select the ‘Client Web Part (Host Web)’. Name it as ‘ListsWebPart’ and Click ‘Add’ Select the default option to create the new web part page. You can us...

Tenant Admin Permissions for SharePoint App-Only Add-In

Microsoft has changed the way to provide Tenant Admin permissions for the app-only add-in. Below is the new process to grant tenant admin permissions for app-only Add-In. • Register app id for the add-in under normal site collection in the tenant where add-in will be deployed. Here you need to generate the new client id and secret. Make sure you copy the client secret.         o URL: https://[tenant].sharepoint.com/_layouts/15/appregnew.aspx • Provide necessary details for the add-in registration and register ID and secret for your add-in • Move to appinv.aspx page under your tenant admin site       o URL: https://[tenant]-admin.sharepoint.com/_layouts/15/appinv.aspx • Perform a lookup for the app id registered in previous steps in appinv.aspx page • Provide needed permissions for your add-in registration • Perform trust for the updated add-in registration

SharePoint solution(.wsp) stuck in deploying/retracting

SharePoint solution(.wsp) stuck in deploying/retracting We were getting a strange issue while deploying the SharePoint solution on our onprem environment. The status of the solution was always in deploying or retracting but never changed. Below are the possible solutions: 1. SharePoint Timer service(SPTimerV4) should be started on the all the WFE and APP servers on the FARM. Restart the timer service once if possible. 2. Restart the SharePoint Administration service on the all the servers 3. Make sure all the servers are in same time zone 4. Restart all the WFE/APP servers 5. Execute the powershell Start-SPAdmin( Equivalent stsadm command stsadm -o execadmsvsjobs ) on all the servers on the farm 6. Clear the Config cache on the index server Add-PSSnapin -Name Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue Stop-Service SPTimerV4  $folders = Get-ChildItem C:\ProgramData\Microsoft\SharePoint\Config   foreach ($folder in $folders) ...