{"id":113,"date":"2014-11-19T09:30:00","date_gmt":"2014-11-19T09:30:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2014\/11\/19\/connecting-to-cloud-services\/"},"modified":"2022-09-30T09:32:25","modified_gmt":"2022-09-30T16:32:25","slug":"connecting-to-cloud-services","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/connecting-to-cloud-services\/","title":{"rendered":"Connecting to Cloud Services"},"content":{"rendered":"<p>Modern applications often rely on services for analytics, data storage and retrieval, and customer information. It\u2019s increasingly common to see applications that blend together services such as Salesforce with Azure Storage and a couple of analytics services such as Application Insights or Flurry. While these services provide usable REST APIs and client libraries, connecting to them remains a manual process.<\/p>\n<p>Visual Studio 2013 added a Connected Services dialog that started to automate this manual process and in Visual Studio 2015 Preview, we\u2019re going further: we\u2019ve added support for more services such as Azure Storage and Salesforce in addition to existing support for Azure Mobile Services and Office 365 APIs.<\/p>\n<p>If you\u2019ve tried to add a service to your application manually, you\u2019ve probably experienced a workflow that involves adding NuGet, Bower, or NPM packages, trips to an online portal to retrieve connection strings, a (perhaps futile) search for relevant documentation to explain further details to set the service up, and possibly a lesson in OAuth. The Connected Services experience blends together Getting Started guidance, with a wizard-based approach for finding relevant services, getting the right connection libraries, and configuring the services.<\/p>\n<p>This blog post gives an overview of the experience. To get more details, take a look at our <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/azure\/dn872474.aspx\">getting started documentation for Connected Services<\/a> and this <a href=\"https:\/\/channel9.msdn.com\/Events\/Visual-Studio\/Connect-event-2014\/418\">Channel 9 video on Connected Services<\/a>.<\/p>\n<h2>Walking Through an Example<\/h2>\n<p>Once you\u2019ve installed Visual Studio 2015, to view a list of services available for your project, right-click on the References node in Solution Explorer and choose <strong>Add Connected Service. <\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/8446.2014FallAddConnServiceAddConnectedServicesfromReferencesnodeinSolutionExplorer_2D2F0813.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border: 0px;\" title=\"Add Connected Services from References node in Solution Explorer\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/8446.2014FallAddConnServiceAddConnectedServicesfromReferencesnodeinSolutionExplorer_2D2F0813.png\" alt=\"Add Connected Services from References node in Solution Explorer\" width=\"278\" height=\"480\" border=\"0\" \/><\/a><\/p>\n<p>In the service selection page, select the service you want to consume. Let\u2019s take a look at each of the options from this dialog: Azure Storage, Azure Mobile Services, Office 365, and Salesforce.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/6303.2014FallAddConnServiceAddConnectedServicesdialog_2FD7C3C4.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border: 0px;\" title=\"Add Connected Services dialog\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/6303.2014FallAddConnServiceAddConnectedServicesdialog_2FD7C3C4.png\" alt=\"Add Connected Services dialog\" width=\"640\" height=\"420\" border=\"0\" \/><\/a><\/p>\n<h2>Azure Storage<\/h2>\n<p>You can use the Add Connected Service dialog to connect to Azure Storage from ASP.NET Web projects, ASP.NET 5 projects, Cloud Service Web and Worker role projects, and .NET Mobile Service projects. The dialog will automatically retrieve all configuration information and add it your project so that you don\u2019t have to leave Visual Studio and look for connection strings on the Portal. It also gives you getting started guidance that highlights the next steps for using Azure Storage such as uploading a blob to a container or inserting messages into a queue, reducing the need for you to search online.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/6131.ConnecttoAzureServicesfromAddConnectedServicesdialog_7148F366.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border-width: 0px;\" title=\"Connect to Azure Storage from Add Connected Services dialog\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/6131.ConnecttoAzureServicesfromAddConnectedServicesdialog_7148F366.png\" alt=\"Connect to Azure Storage from Add Connected Services dialog\" width=\"640\" height=\"439\" border=\"0\" \/><\/a><\/p>\n<h2>Azure Mobile Services<\/h2>\n<p>Today\u2019s data-driven mobile apps often have three basic service needs: data storage, authentication, and push notifications. You can use Azure Mobile Services to fulfill all those requirements with built-in support for SQL Azure, authentication support for Azure AD, Facebook, Google, Twitter, and Microsoft accounts, and push notifications to all major platforms using Azure Notification Hubs. You can connect any .NET or JavaScript Windows Store and Phone app as well as cross-platform Cordova apps to Mobile Services using the Add Connected Service dialog.<\/p>\n<p>Without ever having to leave Visual Studio, you can quickly connect to an existing mobile service or provision a new one with either a JavaScript or a .NET backend. The Add Connected Service dialog will add Mobile Service references using the Mobile Services NuGet package and connection strings to your Mobile Service. It will also provide you getting started guidance on storing and retrieving data so that you\u2019re immediately ready to start using your Mobile Service.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/4087.UseexistingAzureMobileServicesorcreatenewonesfromAddConnectedServicesdialog_181709A7.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border-width: 0px;\" title=\"Use existing Azure Mobile Services or create new ones from Add Connected Services dialog\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/4087.UseexistingAzureMobileServicesorcreatenewonesfromAddConnectedServicesdialog_181709A7.png\" alt=\"Use existing Azure Mobile Services or create new ones from Add Connected Services dialog\" width=\"640\" height=\"439\" border=\"0\" \/><\/a><\/p>\n<p>Azure Storage and Azure Mobile services integrate with the new account manager in Visual Studio, which lets you access Azure resources through the same account you\u2019ve used to sign in to the IDE. The new account picker also makes it possible to switch between resources administered from different user accounts. See Ji Eun\u2019s post to learn about <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/improving-the-visual-studio-account-management-experience\/\">other improvements in Visual Studio when working with multiple accounts<\/a>.<\/p>\n<h2>Office 365 APIs<\/h2>\n<p>Many companies are deploying Office 365. More than just a suite of office productivity tools, Office 365 includes services that enable you to build applications centered on employees\u2019 Mail, Calendar, Contacts, and Files. The Office 365 integration in VS enables you to sign in to your Office 365 account, register an application, choose an appropriate service for consumption, and apply required permissions.<\/p>\n<p>Office 365 APIs can be added to a wide variety of projects such as WPF desktop applications, ASP.NET Web applications, Store and Phone apps, and finally cross-platform applications built with Apache Cordova or Xamarin. The Add Connected Service dialog will add client libraries from NuGet for the selected service and give you sample code that you can copy and paste into your projects. Check out our documentation to <a href=\"http:\/\/dev.office.com\/build\">learn more about building apps for Office<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/2437.LearnaboutOffice365APIsviaAddConnectedservicedialog_77FBFCE9.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border-width: 0px;\" title=\"Learn about Office 365 APIs via Add Connected service dialog\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/2437.LearnaboutOffice365APIsviaAddConnectedservicedialog_77FBFCE9.png\" alt=\"Learn about Office 365 APIs via Add Connected service dialog\" width=\"640\" height=\"439\" border=\"0\" \/><\/a><\/p>\n<h2>Salesforce<\/h2>\n<p>We designed the Add Connected Services dialog so you can use it with all sorts of cloud services, including third party services such as Salesforce. You can use the Add Connected Services dialog to connect your ASP.NET Web projects for authentication and consumption of data on Salesforce or a console app for headless scheduled jobs. The Salesforce Add Connected Services wizard will configure your application to consume Salesforce REST APIs, add the Salesforce .NET SDK NuGet package, configure a Salesforce Connected App oAuth endpoint, and provide detailed Getting Started guidance.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/0383.ConfigureSalesforcefor.NETfromAddConnectedServicedialog_0C814C68.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border-width: 0px;\" title=\"Configure Salesforce for .NET from Add Connected Service dialog\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/0383.ConfigureSalesforcefor.NETfromAddConnectedServicedialog_0C814C68.png\" alt=\"Configure Salesforce for .NET from Add Connected Service dialog\" width=\"640\" height=\"439\" border=\"0\" \/><\/a><\/p>\n<h2>Active Directory<\/h2>\n<p>Adding Active Directory support to your application manually is fairly involved. Using the Azure Active Directory Authentication wizard, you can quickly add Single Sign-On (SSO) for ASP.NET MVC applications or AD authentication in Web API services. To use the wizard, right click on your project in Solution Explorer and choose the <strong>Configure Azure AD Authentication<\/strong> option.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/7230.ConfigureAzureActiveDirectoryAuthenticationbyrightclickingonproject_536A6F65.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border-width: 0px;\" title=\"Configure Azure Active Directory Authentication by right clicking on project\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/7230.ConfigureAzureActiveDirectoryAuthenticationbyrightclickingonproject_536A6F65.png\" alt=\"Configure Azure Active Directory Authentication by right clicking on project\" width=\"260\" height=\"480\" border=\"0\" \/><\/a><\/p>\n<p>For Single Sign On, the wizard will inject startup code into your project that requests users to log in before accessing the site. With AD Authentication on Web API projects, all controllers in your project are adorned with an Authorize attribute thereby restricting access only to authorized users. In both cases, the wizard will add identity related NuGet packages, provision an AD app on your behalf in your directory and modify your web.config or app.config with appropriate credentials.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/4186.ConfigureAzureActiveDirectoryAuthenticationdialog_613CB560.png\"><img decoding=\"async\" style=\"float: none; margin-left: auto; margin-right: auto; border-width: 0px;\" title=\"Configure Azure Active Directory Authentication dialog\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/4186.ConfigureAzureActiveDirectoryAuthenticationdialog_613CB560.png\" alt=\"Configure Azure Active Directory Authentication dialog\" width=\"640\" height=\"439\" border=\"0\" \/><\/a><\/p>\n<p>We\u2019d love to hear any feedback you have about the Add Connected Service experience. To leave us feedback, you can comment on this post, leave us feedback on <a href=\"https:\/\/visualstudio.uservoice.com\/forums\/265038-connected-services\">UserVoice<\/a>, or (in Visual Studio) simply click on the Send a Smile icon.<\/p>\n<p>And if you\u2019re interested in plugging into the Add Connected Service dialog with tooling for your service, please fill out this <a href=\"https:\/\/aka.ms\/ConnectedServicesInVS\">survey<\/a>.<\/p>\n<table style=\"width: 674px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"127\"><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/3513.image_thumb_21069BE6.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2014\/11\/3513.image_thumb_21069BE6.png\" alt=\"image\" width=\"115\" height=\"135\" border=\"0\" \/><\/a><\/td>\n<td valign=\"top\" width=\"545\"><strong>Merwan Hade<\/strong>, Program Manager II, Visual Studio Cloud Platform Tools<\/p>\n<p>Merwan is a Program Manager on the Azure Tools team in Visual Studio. He has worked on a number of tooling features, all designed to make it easier for developers to build and debug applications that use cloud services.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Modern applications often rely on services for analytics, data storage and retrieval, and customer information. It\u2019s increasingly common to see applications that blend together services such as Salesforce with Azure Storage and a couple of analytics services such as Application Insights or Flurry. While these services provide usable REST APIs and client libraries, connecting to [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1085,1195,1196,4980,1028,155,1029],"tags":[237,85,880,376,124,185,357,12,353],"class_list":["post-113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-cross-platform","category-desktop","category-java","category-mobile","category-visual-studio","category-web","tag-net","tag-asp-net","tag-get-started","tag-java","tag-javascript","tag-node-js","tag-sql","tag-visual-studio","tag-xamarin"],"acf":[],"blog_post_summary":"<p>Modern applications often rely on services for analytics, data storage and retrieval, and customer information. It\u2019s increasingly common to see applications that blend together services such as Salesforce with Azure Storage and a couple of analytics services such as Application Insights or Flurry. While these services provide usable REST APIs and client libraries, connecting to [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}