Change domain on provider hosted add-in

338 Views Asked by At

How do I get my domain changed in my add-in? It seems it's a catch 22. I have an azurewebsite that I registered the app under and have my clientid and secret for my add-in pointing to that domain... [app].azurewebistes.net. I have tied a new domain name to the azurewebsite that I want to use but I cant go into the seller dashboard and "change" the app redirect uri to my new domain for the "already registered" clientid and secret. If I create a new one and deploy my new web.config, my current app will break. Need advice... Is this a special ticket?

1

There are 1 best solutions below

0
On

Unfortunately the Seller Dashboard has a lot of limitations. And as far as I know it's not possible to change the host name of the app once it's "in production" from the dashboard. (this is why it's generally a best practice to buy a domain you one and you'll use to make alias instead of relaying on generic generated hostnames you don't control)
The application package itself dictates which url the urls are getting redirected to. As well as what redirections urls are valid.
For the first one go to your application manifest in Visual Studio, in the remote endpoint tab and make sure you add https://yourdomain.com. vs app manifest SharePoint remote endpoints For the second one, right click on your app project, publish, package the app. And then enter the new redirect URL
(Don't forget to bump the version as well) enter image description here
Then just submit this package as a new version of your application to the seller Dashboard. Once it's accepted, install the update on targeted site collections.