Im trying to install a provider hosted app. I have registered the app on /layouts/appregnew.aspx and inserted the generated clientid and client secret web.config of my provider web and then deployed it to the provider url.

I have also created a package and added it to our appcatalog

When I try to add my new addin on /_layouts/viewlsts.aspx->Add->addin and click on my app I get the error message

The specified application identifier is invalid or does not exist.

Im guessing that SP somehow checks on the registered provider host url for the client Id and that I have done something wrong on the provider side... any idea how to diagnos this further?

2 Answers 2


You need to add the ClientId to web.config & AppManifest.xml.
In Web.config,

    <add key="ClientId" value="CLIENT_ID" />
    <add key="ClientSecret" value="CLIENT_SECRET" />

In AppManifest,

 <RemoteWebApplication ClientId="CLIENT_ID" />

Check this link.


If you are facing this issue in a SharePoint On-Premise environment, try to register the app id to the farm with PowerShell script below:

$publicCertPath = "C:\AppCerts\HighTrustSampleCert.cer"
$appId = "cbd25585-947e-4b9d-8686-ed695101ed9a"
$spurl ="https://mycompany.com/"
$spweb = Get-SPWeb $spurl
$realm = Get-SPAuthenticationRealm -ServiceContext $spweb.Site
$certificate = Get-PfxCertificate $publicCertPath
$fullAppIdentifier = $appId + '@' + $realm
New-SPTrustedSecurityTokenIssuer -Name "TheaterCompany" -Certificate $certificate -RegisteredIssuerName $fullAppIdentifier
$appPrincipal = Register-SPAppPrincipal -NameIdentifier $fullAppIdentifier -Site $spweb -DisplayName "TheaterCompany"
Set-SPAppPrincipalPermission -Site $spweb -AppPrincipal $appPrincipal -Scope Site -Right FullControl

More information from here: SharePoint 2013 Provider-hosted Apps: The specified application identifier is invalid or does not exist

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.