After debugging an provider-hosted App of mine on Office 365, I am now trying to debug it on a local SharePoint Farm. I created a new development site collection just for that and configured everything in the Project.

Sadly the deployment of the App Project to the SharePoint times out. Here is the deployment log:

Active Deployment Configuration: Deploy App for SharePoint
3>  Skipping deployment step because a pre-deployment command is not specified.
3>  Skipping the uninstall step because the app for SharePoint is not installed on the server.
3>  Install app for SharePoint:
3>  Uploading the app for SharePoint...
3>  Web.config updated with Client ID 0286c875-dafe-4840-93a6-ad80ac3fa1a9 
3>  Installation is in progress (00:00:01)
3>  Installation is in progress (00:00:03)
... (lots of Installation in progress messages here until 16:32)
3>  Installation is in progress (00:16:32)
3>  App failed to install, cleaning up...
3>  Successfully uninstalled the app for SharePoint.
3>  App installation encountered the following errors:
3>  29.05.2015 14:03:34
3>  @"Error 1
3>        CorrelationId: 919fba63-251c-4daa-aea8-bb92ea699d19
3>        ErrorDetail: The operation took too long.
3>        ErrorType: Transient
3>        ErrorTypeName: Intermittent
3>        ExceptionMessage: 
3>        Source: Common
3>        SourceName: Common App Deployment
3>Error occurred in deployment step 'Install app for SharePoint': Failed to install app for SharePoint. Please see the output window for details.

In the diagnostic logs of the SharePoint Correlation ID I found out that the SharePoint is repeatedly trying to get an Access Token:

Error when try to get access token when deploy AppInstanceId 8ed0f340-508b-415e-99d5-c9f1e434eaca with AppPrincipalId i:0i.t|ms.sp.ext|0286c875-dafe-4840-93a6-ad80ac3fa1a9@b5990129-f04a-4d71-8a1f-5c958300a5e3. Exception=System.InvalidOperationException: An unexpected error was returned from the delegation service.  Error Code: 'invalid_client' Error Description: 'ACS65003: The clientId '0286c875-dafe-4840-93a6-ad80ac3fa1a9/localhost:44300@b5990129-f04a-4d71-8a1f-5c958300a5e3' is not a valid service identity.  Trace ID: 7291eb31-26e3-4449-b1d9-5e543beebdde  Correlation ID: 919fba63-251c-4daa-aea8-bb92ea699d19  Timestamp: 2015-05-29 13:47:43Z'     at Microsoft.SharePoint.Administration.SPAzureAccessControlDelegationServiceClient.HandleUnexpectedError(SPAzureAccessControlDelegationServiceResp... 919fba63-251c-4daa-aea8-bb92ea699d19
...onse delegationServiceResponse)     at Microsoft.SharePoint.ApplicationServices.SPApplicationContextAccessToken.GetResponseOrThrow[T](SPAzureAccessControlDelegationServiceClient delegationServiceClient, SPAzureAccessControlDelegationServiceResponse delegationServiceResponse)     at Microsoft.SharePoint.ApplicationServices.SPApplicationContextAccessToken.IssueApplicationContextAccessToken(SPServiceContext serviceContext, SPApplicationContextAccessTokenCreationParameters creationParameters)     at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext userIdentityContext, String applicationId, Uri applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType consentValue)     at Microsoft.SharePoint.SPServe...  919fba63-251c-4daa-aea8-bb92ea699d19
...rToAppServerAccessTokenManager.GetAccessTokenForDeploymentTask(Guid siteId, SPUserToken userToken, String appPrincipalId)     at Microsoft.SharePoint.Lifecycle.SPAppPrincipalAccessTokenTask.<>c__DisplayClass1.<Deploy>b__0()  919fba63-251c-4daa-aea8-bb92ea699d19

The message ACS65003: The clientId '0286c875-dafe-4840-93a6-ad80ac3fa1a9/localhost:44300@b5990129-f04a-4d71-8a1f-5c958300a5e3' is not a valid service identity seems to be the problem here.

What causes this problem?

  • have you tried to do an IISReset and then deploy again? – Jesus Shelby May 29 '15 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.