Cannot add provider hosted app: “The specified application identifier is invalid”
-
08-02-2021 - |
Question
My Sharepoint Online provider hosted app stopped working. I am running the app/add-in from IIS Express while debugging in VS.
I removed the app from the page, but when I tried to re-add it, I got: "The specified application identifier [CLIENTID] is invalid or does not exist".
Then I went to the App Catalog and uploaded a new version of the same add-in. But I still got the same error.
I then removed the app, and re-uploaded it, but I still got the same error.
Then I wanted to change the Client ID and Client secret (and later build and re-upload the app). I went to https://mycompany.com/_layouts/15/appregnew.aspx and filled in the fields. I clicked Generate on both Client Id and Client secret. But on clicking Create, I got the error: "Sorry, something went wrong"
I retried, but used the Examples (contoso.com) for App Domain and Redirect URL. This time it was successful.
But I will probably not be able to use that registration... why doesn't it work with mycompany.com?
Is it a rights issue? I believe I am not an SP-Tenant admin.
Solution
Registering the new client id failed because I had used mycompany.com as App domain. I changed it to localhost/port and then it worked.