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.
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
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
Post a Comment