Gold Coasthttps://blogs.msdn.microsoft.com/devkeydet
Over the years, this blog has been about many different things related to software development with Microsoft technologies. Since my current role focuses on Dynamics CRM Online, that's what it's primarily about right now.Tue, 27 Jun 2017 18:59:37 +0000en-UShourly1Contributing to Azure Quickstart Templates for Azure Governmenthttps://blogs.msdn.microsoft.com/devkeydet/2017/05/12/contributing-to-azure-quickstart-templates-for-azure-government/
https://blogs.msdn.microsoft.com/devkeydet/2017/05/12/contributing-to-azure-quickstart-templates-for-azure-government/#respondFri, 12 May 2017 15:48:52 +0000https://blogs.msdn.microsoft.com/devkeydet/?p=3595The Azure Quickstart Templates are community contributed ARM templates to help people get started with and accelerate the deployment of common scenarios in Azure. Unfortunately, many of the templates don’t work in Azure Government. Since these templates are contributed by the community, the original contributors may not even know that they need to update their templates. The good news is that ensuring new templates work in multiple Azure environments is part of the current guidance. However, for existing templates, it’s going to take members of the community, like you and me, to ensure that these templates get updated. I’ve updated a few of them already.

Based on feedback from others who I’ve been helping contribute, I’ve recorded some “how to” videos that focus on the Azure Government specific nuances. I’d like to encourage you to consider contributing.

I’ve organized this into two parts. The first part really just focuses on the GitHub part of contributing. In fact, the template in the first video already works with Azure Government. I really just walk you through how to update the README.md file and metadata.json file, then submit the pull request.

In the second video, I make a number of common changes necessary in order to get a template deployable to Azure Government.

While this walkthrough focuses on Azure Government, these are the same kinds of changes necessary to make templates deployable to other environments like AzureChina, Azure Stack, and others.

“I want to use Azure Automation to install Windows Updates on my Azure VM. All the examples I have come across were written with Azure Service Management (ASM) based PowerShell scripts. Are there any examples of doing this with Azure Resource Manager (ARM) VMs?”

I looked around at other examples of how to do this, including this one:

Some notes about my scripts which make them different from most of the ASM examples I reviewed. The runbook script uses PowerShell Remoting to invoke commands on the VM. WinRM is required for PowerShell Remoting. ARM VMs don’t have WinRM enabled by default. My video doesn’t cover configuring WinRM. I’d recommend enabling WinRM through ARM templates as described here:

I use Azure Automation DSC to ensure that the VMs have the prerequisite PSWindowsUpdate and TaskRunner modules installed locally. For simplicity, the runbook script accesses the VM using PowerShell Remoting over ssl via public IP/DNS label. If you prefer to not expose VMs over the public internet you could consider using Azure Automation Hybrid Runbook Workers:

“I have a deployment architecture in Azure which requires web servers (but can be anything) communicate with a remote file share. I want to use Azure File storage. I also need to maintain a geographically redundant environment in another Azure region. I am required to demonstrate end to end execution of my disaster recovery plan. The end result must show all pieces of my deployment architecture running in the other region. “

The first question to this scenario might be: “What about Geo-redundant storage (GRS)?” The answer to that question is that since, at the time of this post, GRS doesn’t give you fine grained control to force Azure Storage to switch to using the replica in the other region, it won’t meet the customer scenario of being able to prove storage has failed over. Note that if you are ok with trusting that GRS will failover in the event of a disaster (as documented) and aren’t *required* to prove it, then you can stop reading this post. Just use GRS. “What about Read-access geo-redundant storage (RA-GRS)? Can’t I rely on RA-GRS to perform the replication for me and just use something like AzCopy to copy the read-only replica into a new storage account? The end result being a fully functioning share based on the replica?" You could if Azure File storage supported RA-GRS. It doesn’t at the time of this post.

I put together a little code sample to demonstrate one approach to address the scenario above:

]]>https://blogs.msdn.microsoft.com/devkeydet/2016/10/12/manual-failover-of-azure-file-storage/feed/0Using postman with Azure ADhttps://blogs.msdn.microsoft.com/devkeydet/2016/03/22/using-postman-with-azure-ad/
https://blogs.msdn.microsoft.com/devkeydet/2016/03/22/using-postman-with-azure-ad/#respondTue, 22 Mar 2016 12:31:37 +0000https://blogs.msdn.microsoft.com/devkeydet/?p=3513UPDATE (27JUN2017): I've been ping'd a few times about updating this post since it uses the old portal UI. It seems many people land here through their favorite search engine. John Gallant has an updated post here that should server the same purpose: http://blog.jongallant.com/2017/03/azure-active-directory-access-tokens-postman/

Postman (https://www.getpostman.com/) is a popular tool for testing out a web api. Figuring out how to use it with a resource protected by Azure AD is a bit daunting for many. I created this walkthrough video to help you understand how to use the postman oauth 2 authorization helper with AAD.

]]>https://blogs.msdn.microsoft.com/devkeydet/2016/03/22/using-postman-with-azure-ad/feed/0Using an ERD tool to create CRM entitieshttps://blogs.msdn.microsoft.com/devkeydet/2015/05/07/using-an-erd-tool-to-create-crm-entities/
https://blogs.msdn.microsoft.com/devkeydet/2015/05/07/using-an-erd-tool-to-create-crm-entities/#commentsThu, 07 May 2015 07:53:00 +0000https://blogs.msdn.microsoft.com/devkeydet/2015/05/07/using-an-erd-tool-to-create-crm-entities/I get asked this now and then:

“I want to use Erwin [or Visio or Visual Studio or…] to graphically design the CRM entity model, then have the actual CRM entities generated off of the tool I used to design the entities.”

While I am not aware of a direct way to do this with any ERD tools, there is a multi-step process you can use as long as your ERD designer can generate a SQL or Access database:

Of course, you’ll need to make sure you don’t pick data types in your diagram that the xrmspeedy tool can’t translate to CRM types, but this approach can be used as a productivity enhancement to those who prefer to diagram out their entities and generated them. Since this is an open source tool, you might consider contributing feedback if you have ideas for improvement. After a little trial and error, I’ve found I get value out of using Visual Studio’s Entity Framework Designer plus this tool when brainstorming data models and building POCs. Your Mileage May Vary (YMMV).

“I love early bound code because of compile time checking, LINQ query enablement, etc. I want to batch update a bunch of records, but OrganizationServiceContext.SaveChanges() executes under the hood as one web service call per entity. How do I batch update? Also, how do I make sure that only the fields I change are updated?”

The answer is that you basically have to combine your crmsvcutil.exe generated code with ExecuteMultipleResults. Here’s an example:

https://blogs.msdn.microsoft.com/devkeydet/2015/04/27/batch-updating-fields-with-crmsvcutil-generated-code/feed/1Using LINQPad with the CRM Online OData servicehttps://blogs.msdn.microsoft.com/devkeydet/2015/04/22/using-linqpad-with-the-crm-online-odata-service/
https://blogs.msdn.microsoft.com/devkeydet/2015/04/22/using-linqpad-with-the-crm-online-odata-service/#commentsWed, 22 Apr 2015 11:31:00 +0000https://blogs.msdn.microsoft.com/devkeydet/2015/04/22/using-linqpad-with-the-crm-online-odata-service/I’ve been a longtime fan of LINQPad (www.linqpad.net) as a general purpose tool for executing LINQ queries with various LINQ enabled technologies as well as a general purpose scratchpad for testing out .NET code without having to fire up Visual Studio. I’ve already blogged about how to use LINQPad to work with the CRM Online SOAP service:

One thing that may not be obvious is how to use LINQPad to query the OData service that comes with Dynamics CRM Online. Using the same basic concept that I showed with the SOAP service, I created a video walkthrough of how to interact with the OData service from LINQPad:

One of the things I did, after creating the video, was to write a reusable helper method in the LINQPad MyExtensions class so I can reuse the code to get the access token across multiple LINQPad query sessions. Here's the code for the extension:

https://blogs.msdn.microsoft.com/devkeydet/2015/04/22/using-linqpad-with-the-crm-online-odata-service/feed/1Setting up a Microsoft Cloud trialhttps://blogs.msdn.microsoft.com/devkeydet/2015/02/19/setting-up-a-microsoft-cloud-trial/
https://blogs.msdn.microsoft.com/devkeydet/2015/02/19/setting-up-a-microsoft-cloud-trial/#commentsThu, 19 Feb 2015 11:28:45 +0000https://blogs.msdn.microsoft.com/devkeydet/2015/02/19/setting-up-a-microsoft-cloud-trial/CRM Online based solutions often run across the broader Microsoft Cloud, not just CRM Online alone. As they say, a picture is worth a thousand words. So here’s a picture that hits home this point at a high level.

To help people get started trying this environment out, I’ve created a video that walks you through setting up a trial for CRM Online, Office 365, and Microsoft Azure where all the services are provisioned for Single Sign On (SSO) under a single Azure Active Directory tenant and provide shared administration.

]]>https://blogs.msdn.microsoft.com/devkeydet/2015/02/19/setting-up-a-microsoft-cloud-trial/feed/2Debug CRM Online Pluginshttps://blogs.msdn.microsoft.com/devkeydet/2015/02/17/debug-crm-online-plugins/
https://blogs.msdn.microsoft.com/devkeydet/2015/02/17/debug-crm-online-plugins/#commentsTue, 17 Feb 2015 12:52:29 +0000https://blogs.msdn.microsoft.com/devkeydet/2015/02/17/debug-crm-online-plugins/Debugging plugins in CRM Online just got a lot better with the latest version of the plugin registration tool that ships with CRM 2015. In the video below, I walk you through how to debug CRM Online plugins using Visual Studio.