Skip to main content

Error when running Register-SPAppPrincipal

Problem
You get the error, "Cannot find an SPWeb object with Id or Url", when trying to get the RootWeb of the SPSite object when you register a new app with the Register-SPAppPrincipal PowerShell cmdl.
Register-SPAppPrincipal -NameIdentifier $appPrincipalIdentifier -Site $site.RootWeb -DisplayName 'ProviderHostedApp'

The cause could be
The user who is running the script is NOT a farm administrator.

Fix the problem
Add the user to the farm administrator group

Comments

Popular posts from this blog

The form cannot be submitted because of an error

Problem I created a reusable approval workflow in SharePoint Designer 2010. I initiated the workflow. Then when I filled in the Assigned To field I got an error pop up saying: "The form cannot be submitted because of an error". Solution Uninstall the KB2553322 for SharePoint Designer. I didn't uninstall KB2553322 for Microsoft Office. Restart SharePoint Designer. Recreate the workflow.

Can't read from source file or disk

When you are using Windows Explorer View in SharePoint you can't MOVE a file from one site to another if it's not directly below the root site, but you can copy the file. See the different scenarios below. Working Scenario Moving files between libraries within the same site. For example: "http://sharepointsite/sites/site1/site2/library1" (source) "http://sharepointsite/sites/site1/site2/library2" (destination) Moving files between libraries across different sites as long as they are directly below the root site. For example: "http://sharepointsite/site1/library1 (source) "http://sharepointsite/site2/library2 (destination) Non-working Scenario Moving files between libraries in sub-sites that are more than 1 level below the root site. For example: "http://sharepointsite/sites/site1/site1/library1" (source) "http://sharepointsite/sites/site1/site2/library2" (destination)

Application Server Administration job failed

Problem CPU 99%. User Profile Synchronization is stuck on Running. SharePoint Timer Service is eating up the whole CPU and the event viewer says: Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance Reason: An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by xxxxxxxx, in the OWSTIMER process, on machine xxxxxxx.  View the tracing log for more information about the conflict. Technical Support Details: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by xxxxxxxx, in the OWSTIMER process, on machine xxxxxxx. View the tracing log for more information about the conflict.    at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()    at Micro...