Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Walkthrough: Register an Azure-Aware Plug-in with Plug-in Registration Tool

[Applies to: Microsoft Dynamics CRM 2011]

This walkthrough demonstrates how to configure Windows Azure Access Control Service (ACS) and register the ServiceBusPlugin plug-in using the Plug-in Registration tool. The ServiceBusPlugin plug-in is provided with Microsoft Dynamics CRM 2011 and supports posting the execution context of the current Microsoft Dynamics CRM operation to a Windows Azure solution endpoint. For this walkthrough, the plug-in is registered to post the execution context of the CreateRequest message for an Account entity to the Windows Azure Service Bus.

The following prerequisites must be completed before starting this walkthrough:

  • Access to a compiled version of the Plug-in Registration tool. As of version 5.0.13 of the SDK, you can find the tool’s executable file in the Bin folder of the SDK download. In previous SDK releases, you must build the tool from source code provided in the Tools\PluginRegistration folder.

  • Obtain access to Microsoft Dynamics CRM 2011 or Microsoft Dynamics CRM Online.

  • Your system user account must have the System Customizer or System Administrator role to register a plug-in. For more information, see How Role-Based Security Can Be Used to Control Access to Entities in Microsoft Dynamics CRM.

  • Have access to a Windows Azure platform service namespace that uses ACS version 1 or 2, to which Microsoft Dynamics CRM will post a message.



    ImportantImportant
    Only the Plug-in Registration tool from the 5.0.6 or newer version of the Microsoft Dynamics CRM SDK supports ACS v2.

  • If you are using Microsoft Dynamics CRM 2011, the server must be configured for Windows Azure integration according to the instructions in the topic Configure Windows Azure Integration with Microsoft Dynamics CRM.

  • There must be a listener application actively listening to the specified solution endpoint for Microsoft Dynamics CRM to successfully post to the Windows Azure Service Bus. For more information, see Write a Listener for a Windows Azure Solution.

Connect to the Microsoft Dynamics CRM Server

  1. Run the Plug-in Registration tool.

    noteNote
    The Microsoft.Crm.Sdk.Proxy.dll and Microsoft.Xrm.Sdk.dll assemblies must be in the same folder as the tool’s executable file or in your computer’s global assembly cache for the tool to run.

  2. Click Create New Connection.

  3. In the Connections panel, enter a name for the connection, the URL of the server where the Microsoft Dynamics CRM Discovery service is hosted, and your logon system user name.

    Connection form fields

  4. Check Use Saved Credentials if your logon credentials are saved in the Windows credential cache on your computer. Otherwise, do not check this box and you will be prompted to enter your password.

  5. Click Connect.

You should now see a list of available organizations that you belong to in the Connections panel.

Create a Service Endpoint Configuration

  1. Double-click an organization in the Connections tree view.

  2. Navigate to the Register menu and select Register New Endpoint.

  3. Fill out the Service Endpoint Details dialog box with the information related to your solution as shown in the following figure and described in the table that follows. Make sure the contract you specify is the same contract used by your solution’s listener application.

    Register a new endpoint

     

    UI Element description

    Name (field)

    A name for your service endpoint registration.

    Description (field)

    A description of this endpoint registration.

    Solution Namespace (field)

    The name of the solution’s service namespace.

    Path (field)

    The path of your project. For example, given a service endpoint URL of https://crmsdkdemo-sb.accesscontrol.windows.net/TwoWayService/Demo, the path is TwoWayService/Demo.

    Contract (drop-down menu)

    The endpoint contract. A listener application must use this contract to read the posted message. For more information, see Write a Listener for a Windows Azure Solution.

    Claim (drop-down menu)

    The claims to send to Windows Azure. Use None for the standard claim. Specify UserId or UserInfo to send additional information about the logged on user.

    Federated Mode (checkbox)

    Check this box to use federated mode.

    ID (field)

    Non-writeable field that is filled in automatically with the ID of your endpoint configuration.

    Save & Configure ACS (button)

    Saves the configuration you entered and automates the process of configuring ACS for you. Provides an interactive way to accomplish what is described in the topic Walkthrough: Configure Windows Azure ACS (Version 1) for Microsoft Dynamics CRM Integration.

    Save & Verify Authentication (button)

    Saves the configuration you entered and verifies that ACS is configured correctly.

    Save (button)

    Saves the configuration you entered and closes the dialog.

  4. If you have not yet configured Windows Azure ACS integration with Microsoft Dynamics CRM, and you would like the Plug-in Registration tool to do the configuration for you, click Save & Configure ACS, and then follow the instructions in the next section of this walkthrough. If you have already configured ACS, click Save & Verify Authentication or Save and continue with the instructions in Register the ServiceBusPlugin Plug-in for an Event.

Configure ACS

  1. After clicking Save & Configure ACS, the ACS Configuration dialog box appears. Enter the appropriate data values into the form fields as described in the following table.

     

    Field Name Description

    Management Key

    The management key for your solution. You can obtain this key value from the Windows Azure Management Portal.

    Obtain a Management Key for a Service Bus Namespace

    1. Log on to the portal (https://manage.windowsazure.com).

    2. In the left pane, select SERVICE BUS, and then select the target namespace in the list.

    3. At the bottom of the page, select ACCESS KEY.

    4. In the ACCESS KEY dialog box, the DEFAULT KEY is shown. This is the management key.

    Certificate File

    The public certificate file that was used to configure Microsoft Dynamics CRM for integration with Windows Azure.

    For Microsoft Dynamics CRM 2011, you can download this certificate file from the server. In the Microsoft Dynamics CRM web application select Settings, select Customizations, and then select Developer Resources. Download and save the certificate file.

    Issuer Name

    The name of the issuer. This name must be the same name that was used to configure Microsoft Dynamics CRM for Windows Azure integration. You can obtain the issuer name from the Developer Resources webpage mentioned in the previous description.

    For more information, see Configure Windows Azure Integration with Microsoft Dynamics CRM.

  2. Click Configure ACS. A log of the configuration process is displayed in the output area of the form.

  3. Click Close.

  4. Click Save & Verify Authentication in the Service Endpoint Details dialog box. After the verification is finished you can close the dialog boxes.

Register the ServiceBusPlugin Plug-in for an Event

  1. Select the endpoint that you previously registered in the tree view of the tool.

  2. Navigate to the Register menu and select Register New Step.

  3. Fill out the Register New Step dialog box for an account create event as shown in the following figure.

    Register an endpoint step
  4. Click Register New Step.

The ServiceBusPlugin plug-in will now post the current message containing the execution context to the service bus whenever an account is created. The post is performed asynchronously and is not executed immediately.

Test the Endpoint Registration

After you register the endpoint you can test it. A listener must be running or a queue available on the target endpoint for the service bus post from the plug-in to happen.

Test the Endpoint Registration

  1. Open the Microsoft Dynamics CRM web application for the same organization that you registered the endpoint under.

  2. Navigate to the workplace, select Accounts, and then click New.

  3. Enter an account name, for example: Adventure Works Cycle, into the Account Name field, then click Save & Close.

  4. Wait about 10 minutes for the Windows Azure Service Bus post to occur.

  5. Select Settings, and then select System Jobs.

  6. Open the system job that has the same name that you specified for your service endpoint. Check the status to see if the post was successful, is waiting, or failed.

You can now unregister the endpoint, if so desired, by selecting it in the tool’s tree view and clicking Unregister.

See Also

Microsoft Dynamics CRM 2011
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.