Not able to add app to site in multi tanent Sharepoint Farm 2013.

Occasional Visitor

We are trying to setup our SharePoint app to be used in multi-tenant SharePoint farm setup. We have installed our SharePoint app on Farm1 and it works fine with sites of Farm1. Also we have registered the same app with same Client ID, Client Secret, Title, App Domain, Redirect URI on Farm2 and installed the app to app catalog. When we try to add the app to any site in Farm2 we are getting error "Sorry, something went wrong with adding the app, click to retry".

 

We are seeing following errors in SharePoint logs - 

Exception returned from back end service. System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.    Server stack trace:      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)     at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)    Exception rethrown at [0]:      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)     at Microsoft.SharePoint.AppManagement.IAppManagementServiceApplication.GetAppManagementDatabaseMap()     at Microsoft.SharePoint.AppManagement.AppManagementServiceApplicationProxy.<>c__DisplayClass2.<GetScaleOutDatabaseMap>b__0(IAppManagementServiceApplication channel)     at Microsoft.SharePoint.Administration.SPServiceApplicationProxyBase`1.ExecuteOnChannel(Boolean requireDelegation, Action`1 codeBlock)
 
Error :The app management service is temporarily unavailable., Correlation: dc7b308c-b1a3-471e-82f8-61fa6b31b47b, Exception: System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.    Server stack trace:      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)     at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)    Exception rethrown at [0]:      at Microsoft.SharePoint.Administration.SPServiceApplicationProxyBase`1.ExecuteOnChannel(Boolean requireDelegation, Action`1 codeBlock)     at Microsoft.SharePoint.AppManagement.AppManagementServiceApplicationProxy.GetScaleOutDatabaseMap()     at Microsoft.SharePoint.SPScaleOutDatabaseMap.GetMapCacheEntriesForProxy(ISPScaleOutDatabaseMapProvider mapProvider, Guid forceRefreshVersion)     at Microsoft.SharePoint.SPScaleOutDatabaseMap.GetMapEntry(ISPScaleOutDatabaseMapProvider mapProvider, Byte[] compositeKey, Guid forceRefreshVersion, Guid& version)     at Microsoft.SharePoint.SPScaleOutDatabaseMap.CreateSqlSession(ISPScaleOutDatabaseMapProvider mapProvider, Byte[] compositeKey, Guid forceRefreshVersion, Guid& version)     at Microsoft.SharePoint.SPScaleOutDatabaseCommandExecutor.Execute(ExecuteDelegate operation, ISPScaleOutDatabaseMapProvider mapProvider, SPSqlCommand command, Byte[] compositeKey)     at Microsoft.SharePoint.AppManagement.AppManagementServiceApplicationProxy.RegisterAppIdForProductId(Guid productId, String appId, Guid appInstanceId)     at Microsoft.SharePoint.SPAppLicenseManager.RegisterAppIdForProductId(Guid productId, String appId, Guid appInstanceId)     at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.RegisterOAuthAppId(SPAppInstance instance)     at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.Deploy()     at Microsoft.SharePoint.Administration.SPAppTask.DeployOperation()     at Microsoft.SharePoint.Lifecycle.MonitoredTaskExecution.DoTask()
 
 

 

Note: Both farms have setup different users as farm administrators 

0 Replies