9

I have created a Provider Hosted App for SharePoint Online. I used Azure hosting server to host my app business logic.

Now, somehow I want to move my Hosting server from Azure to another domain. But my app is already published on Office Store and my users already installed the apps and they are using.

I want to know that how I can change my hosting environment for PHA without disturbing the existing users.

What kind of configuration I will need to change in my App?

I have already gone through this post, but its not helpful.

  • 2
    There could be another way, but from where i see it, if you change the domain, then you will have to register the app using new client id and secret. It will be a new app with different client id. – Gautam Sheth Jul 4 '17 at 12:02
  • Thanks :-)That exactly what I thought before putting the question. I hope there should some feasible way for achieving this !!! – Aakash Maurya Jul 4 '17 at 12:05
5

I haven't tried this practically, but I am sharing based on my understanding. Please feel free to comment if any thing is practically incorrect.

Approach-1:

Just configure the new domain with the old domain name. So only hosting location will change, the app will still have valid domain name to redirect.

Approach-2:

While registering the Provider Hosted App, we use following URL.

https://SiteURL/_layouts/15/appregnew.aspx

here we provide the App Domain and Redirect URI. And it gives us a ClientID and ClientSecret key which we use to configure our Provider Hosted App.

Now we have our ClientID. Now lets say our domain has been changed, just go to the following URL

https://SiteURL/_layouts/15/appinv.aspx

You will get following form

enter image description here

Just enter you existing ClientID and click on Lookup. It will fetch already existing details.

Just enter the new Domain and RedirectURI here.

By doing this, the app will still have the existing ClientID and domain also get updated.

Just upload the app again in Catalog and your customer will see update of the app after 24 hours, and after updating the app will run from new server. (During Mean time keep the old server working so that functionality of your app continue working!!!)

Note: Again, I haven't verified anything practically, it may not be the feasible solution. Feedbacks are most welcomed as comment.

Your Answer

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

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