Azure Active Directory SSO using Visual Studio 2015

 

Here is the instruction on using Visual Studio 2015 preview to add Azure Active Directory SSO to an existing MVC Application.

1. Create an Azure Active Directory

2. Add user(s) to directory

3. Right-click the project and click “Configure Azure AD Authentication”

image

4. Enter your Active Directory Domain Name e.g. yourid.onmicrosoft.com  This will integrate an Application to the Active Directory

image

5. Click the Application Link and click the Configure Tab and change the “Reply Url” to your webiste’s Url so Azure AD know where to send the SAML authentication tokens after successfully authenticated the Users.

e.g. https://mywebapp.azurewebsites.net/

6. optional update the [Authorize] attribute in the controllers

7. optional add the login/logout/username html to the view. e.g. add @Html.Partial(“_LoginPartial”) to _layout.cshtml

8. Finally publish the WebApp to Azure. Right click on project and click “Publish…”

Azure Scheduler–run jobs on simple or complex recurring schedules

image

Scheduler

Run your jobs on simple or complex recurring schedules
  • Call services inside or outside of Azure
  • Run jobs on any schedule—now, later, or recurring
  • Use Azure Storage queues for long-running or offline jobs
  • Management REST API

Get Started using Scheduler MSDN

Videos:

Azure Mobile Service

 

image

Windows Azure Mobile Services:

  • A turnkey backend solutions to power your mobile apps on any platforms – iOS, Andrioid, Windows(Store/Phone) or Mac and tools like C#, Java, JavaScript, Xamarin, PhoneGap.
  • Accelerate your mobile app development. Incorporate structured storage in the cloud, user authentication(Facebook, Google, Microsoft, Twitter, Active Directory account)/authorization and push notifications to millions (Notification Hubs) in minutes. Add your custom backend logic in C# or Node.js
  • Introduction to Azure Mobile Service – Scott Guthrie

Below are some tutorials that walkthrough common authentication/authorization/push scenarios you can do with Windows Azure Mobile Services:

Azure WebJobs

 

 

Resources:

Manage Azure using Windows PowerShell

image

http://msdn.microsoft.com/en-us/library/windowsazure/jj156055.aspx

  1. Create a self-signed Management Certificate. Open a Visual Studio command prompt(As administrator). Details.
    makecert -sky exchange -r -n "CN=AzureCertificateName01" -pe -a sha1 -len 2048 -ss My "AzureCertificateName01.cer"
  2. Upload Management Certificate to Azure

    To upload a management certificate to Windows Azure, go to the Settings page in the Management Portal, and then click MANAGEMENT CERTIFICATES.

  3. To install Windows Azure PowerShell. Download here.
  4. Set Windows PowerShell execution policy (As adminstrator):
    PS C:\> Set-ExecutionPolicy RemoteSigned
  5. Store Azure Subscription and Certificate locally (Run once) details
    $mySubID = "subscritionID" 
        
    $certThumbprint = "Thumbprint"
    $myCert = Get-Item cert:\CurrentUser\My\$certThumbprint
    $mySubName = "SubscriptionName"
    Get-AzureSubscription
    Set-AzureSubscription -SubscriptionName $mySubName -Certificate $myCert -SubscriptionID $mySubID
  6. Select Azure Subscription
    Select-AzureSubscription -SubscriptionName $mySubName
  7. Store Azure Subscription and Certificate locally
    Start-AzureVM -ServiceName "myCloudServiceName" -Name "myVMServiceName"
        
    Stop-AzureVM -ServiceName "myCloudServiceName" -Name "myVMServiceName"

Continuous Deployment to Azure WebSite from BitBucket, CodePlex, Dropbox, GitHub, or Mercurial

 

image

http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-git/#Step7

  1. After your web site project has been pushed to a repository web site, in the Windows Azure Portal quick glance section, select Set up deployment from source control. The Set Up Deployment dialogappears that asks Where is your source code?.

  2. Choose the source control method that you are using.

  3. When prompted, enter your credentials for the service you selected.

  4. After you have authorized Windows Azure to access your account, you will be prompted with a list of repositories.

    git-ChooseARepositoryToDeploy

  5. Select the repository that you want to associate with your Windows Azure web site. Click the checkmark to continue.

    NOTE

    When enabling continuous deployment with GitHub or BitBucket, both public and private projects will be displayed.

  6. Windows Azure will create an association with the selected repository, and will pull in the files from the master branch. After this process completes, the deployment history on the Deployments page will show an Active Deployment message like the following:

    git-githubdeployed

  7. At this point your project has been deployed from your repository of choice to your Windows Azure web site. To verify that the site is active, click the Browse link at the bottom of the portal. The browser should navigate to the web site.

  8. To verify that continuous deployment is occurring, make a change to your project and then push the update to the repository you have associated with this web site. Your web site should update to reflect the changes shortly after the push to the repository completes. You can verify that it has pulled in the update on the Deployments page of your Web Site.

    git-GitHubDeployed-Updated

How continuous deployment works

Continuous deployment works by providing the DEPLOYMENT TRIGGER URL found in the deploymentssection of your site’s Configure tab.

git-DeploymentTrigger

When updates are made to your repository, a POST request is sent to this URL, which notifies your Windows Azure Web Site that the repository has been updated. At this point it retrieves the update and deploys it to your web site.

Specifying the branch to use

When you enable continuous deployment, it will default to the master branch of the repository. If you want to use a different branch, perform the following steps:

  1. In the portal, select your web site and then select CONFIGURE.

  2. In the deployments section of the page, enter the branch you wish to use in the BRANCH TO DEPLOYfield, and then hit enter. Finally, click SAVE.

    Windows Azure should immediately begin updating based on changes to the new branch.