Configure deployment sources for App Services on Azure Stack Hub
App Service on Azure Stack Hub supports on-demand deployment from multiple source control providers. This feature lets app developers deploy directly from their source control repositories. If users want to configure App Service to connect to their repositories, a cloud operator must first configure the integration between App Service on Azure Stack Hub and the source control provider.
In addition to local Git, the following source control providers are supported:
- GitHub
- BitBucket
- OneDrive
- DropBox
View deployment sources in App Service administration
Sign in to the Azure Stack Hub administrator portal as the service admin.
Browse to All Services and select the App Service.

Select Source control configuration. You can see the list of all configured deployment sources.

Configure GitHub
You must have a GitHub account to complete this task. You might want to use an account for your organization rather than a personal account.
Sign in to GitHub, go to https://www.github.com/settings/developers, and then select Register a new application.

Enter an Application name. For example, App Service on Azure Stack Hub.
Enter the Homepage URL. The Homepage URL must be the Azure Stack Hub portal address. For example,
https://portal.<region>.<FQDN>. For more information on the Azure Stack Hub fully qualified domain name (FQDN), see Azure Stack Hub DNS namespace.Enter an Application Description.
Enter the Authorization callback URL. In a default Azure Stack Hub deployment, the URL is in the form
https://portal.<region>.<FQDN>/TokenAuthorize.Select Register application. A page is displayed listing the Client ID and Client Secret for the app.

In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.
Go to Resource Providers and select the App Service Resource Provider Admin.
Select Source control configuration.
Copy and paste the Client ID and Client Secret into the corresponding input boxes for GitHub.
Select Save.
Configure BitBucket
You must have a BitBucket account to complete this task. You might want to use an account for your organization rather than a personal account.
Sign in to BitBucket and go to Integrations under your account.

Select OAuth under Access Management and Add consumer.

Enter a Name for the consumer. For example, App Service on Azure Stack Hub.
Enter a Description for the app.
Enter the Callback URL. In a default Azure Stack Hub deployment, the callback URL is in the form
https://portal.<region>.<FQDN>/TokenAuthorize. For BitBucket integration to succeed, the URL must follow the capitalization listed here.Enter the URL. This URL should be the Azure Stack Hub portal URL. For example,
https://portal.<region>.<FQDN>.Select the Permissions required:
- Repositories: Read
- Webhooks: Read and write
Select Save. You now see this new app, along with the Key and Secret, under OAuth consumers.

In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.
Go to Resource Providers and select the App Service Resource Provider Admin.
Select Source control configuration.
Copy and paste the Key into the Client ID input box and Secret into the Client Secret input box for BitBucket.
Select Save.
Configure OneDrive
You must have a Microsoft account linked to a OneDrive account to complete this task. You might want to use an account for your organization rather than a personal account.
Note
OneDrive for business accounts are currently not supported.
Go to https://apps.dev.microsoft.com/?referrer=https%3A%2F%2Fdev.onedrive.com%2Fapp-registration.htm and sign in using your Microsoft account.
Under My applications, select Add an app.

Enter a Name for the new app registration: enter App Service on Azure Stack Hub and then select Create Application.
The next screen lists the properties of your new app. Save the Application ID to a temporary location.

Under Application Secrets, select Generate New Password. Make a note of the New password generated. This password is your application secret and it's not retrievable after you select OK.
Under Platforms, select Add Platform and then select Web.
Enter the Redirect URI. In a default Azure Stack Hub deployment, the redirect URI is in the form
https://portal.<region>.<FQDN>/TokenAuthorize.
Add the Microsoft Graph Permissions - Delegated Permissions.
- Files.ReadWrite.AppFolder
- User. Read

Select Save.
In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.
Go to Resource Providers and select the App Service Resource Provider Admin.
Select Source control configuration.
Copy and paste the Application ID into the Client ID input box and Password into the Client Secret input box for OneDrive.
Select Save.
Configure DropBox
Note
You must have a DropBox account to complete this task. You might want to use an account for your organization rather than a personal account.
Go to https://www.dropbox.com/developers/apps and sign in using your DropBox account credentials.
Select Create app.

Select DropBox API.
Set the access level to App Folder.
Enter a Name for your app.

Select Create App. You're presented with a page listing the settings for the app, including App key and App secret.
Make sure that the App folder name is set to App Service on Azure Stack Hub.
Set the OAuth 2 Redirect URI and then select Add. In a default Azure Stack Hub deployment, the redirect URI is in the form
https://portal.<region>.<FQDN>/TokenAuthorize.
In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.
Go to Resource Providers and select the App Service Resource Provider Admin.
Select Source control configuration.
Copy and paste the Application Key into the Client ID input box and App secret into the Client Secret input box for DropBox.
Select Save.
Next steps
Users can now use the deployment sources for things like continuous deployment, local Git deployment, and cloud folder synchronization.
Feedback
Submit and view feedback for