You have published your app to the store, hooray! Now you want to automate that deployment with VSTS…
If you are having issues with Microsoft’s documentation to accomplish this task, here is a summary of how I got it to work. (I should note that you must have an app in the store manually first for this to work).
1. Go to your Dev Center Dashboard (https://developer.microsoft.com/en-us/dashboard/apps/overview).
2. Click the gear icon in the top right hand corner > Manage Users
3. “Add Azure AD Application” > “New Azure AD Application”
4. Give it a name, like “Windows Store Connection”, the reply URL and App ID URL can be anything at this stage. IMPORTANT for it to be part of the Developer Role so that this can publish to the Store.
5. Click Save, and you will be taken to a confirmation page. Click Manage Users to see your newly created application in the grid with a guid. Click that one to edit it.
6. Under Keys, click Add New Key. Make note of the ClientId, Key, and Azure Tenant Id, you will not be able to see that key again after you leave this page. Upon confirmation, click Manage Users to go back to your list, and then click on the Connection again to confirm that it looks like this:
Now we move on to the build step.
1. Add Step Windows Store – Publish
2. For the Service Endpoint, click New
Name your connection, something like “WindowsStoreConnection”
Windows Store API Url: https://manage.devcenter.microsoft.com
Azure Tenant Id: what you noted from your creation of the Azure AD Application, or you can find it in the portal (https://portal.azure.com), clicking on the Azure Active Directory > Properties > Directory ID
ClientID: what you noted from the creation of the Azure AD Application
Client Secret: your key that you noted from the key creation of the Azure AD Application
3. Click OK and choose your newly created service endpoint from the dropdown
4. Application identification method: ID
5. Application ID: get this from your Dev Center Dashboard > App Management > App Identity > Store ID
Now, when your run this build step, it will publish your app to the store and poll the service until it is finished (so keep in mind this could consume one of your build agents for up to 3 business days)
TL;DR
The MS docs led me to believe that I could create my Azure AD Application from the portal via the App Registrations. When I did that, I got the dreaded “503 Service Unavailable” error on my build publish step. The trick was to create the Azure AD Application from the Windows Dev Center, give it Developer permissions, and tie that application back to my Windows Dev Center connection endpoint.
2 Comments