Skip to main content
Matrix42 Self-Service Help Center

Azure VM Discovery

A step by step guide to creating SDDM Azure VM Discovery.  Learn to create Azure Service Principal(s) and supply that information to SDDM for the discovery of Azure VM resources.

Goal

Among the discovery mechanisms FireScope provides is the Azure Virtual Machine Discovery. This process will use a Service principal credential that you create to access and discover virtual machines inside of your Azure environment. As many companies may be broadly distributed across the world in their Azure environments, multiple credentials will need to be created to discover each of the regions or subscriptions inside the customer's Azure enterprise. Each one of these credentials will be required in an individual discovery job which will then discover the virtual machines in that region which are visible by the service principal credential created. We will provide in this document the steps needed to create the credentials, create the discovery jobs, and view the results in the FireScope environment.

Configuring Azure

First, an Azure Service Principal will need to be created which can access specified subscriptions to view VM resources.

  1. Log into your Azure portal.

    clipboard_ea04bd080a655ad832a7225dc36674842.png
  2. Inside of Azure Active Directory select app registrations.

    clipboard_edf0435b96b31e5262eb782612402a8b2.png
  3. Click new registration and enter the name that you wish for this application.

    clipboard_e215ac19a37a4589525d84c4e957a0322.png
  4. The first option “Accounts in this organizational directory only” should be selected.
  5. Click register. Your results page will now be displayed

    clipboard_eb4b1f3bd906d7cedc03b576c80f20824.png

    It is important to copy down the Application (client) ID, and the Directory (tenant) ID values that are given on the results page.

  6. From Azure portal home go to subscriptions, then click the subscription this credential is created for, then select the Access control (IAM) option.

    clipboard_ea91595e9ad7d48c31d1972f8114705e4.png
  7. Click on add role assignment and choose “Reader” role. Another role could be used here as long as it is able to view VM resources desired.

    clipboard_e77d559f4f98ca89ca6d8494ff24330a5.png
  8. Click next.
  9. Click select members.
  10. Find the new principal you created in the earlier step.

    clipboard_ea67471d6660cd900fbe590ab253a90b2.png
  11. Click review and assign to make sure the user and the access row is correct.

    clipboard_e809cb21c5f4bac25a04486c8bc3b1f3a.png
  12. Accept using Review + Assign button.
  13. From Azure portal home, click on Azure Active Directory.
  14. Choose app registrations.
  15. Select the application you just created.
  16. Click certificates and secrets.

    clipboard_e68c50b774d71c37e22c9fcd2b808c7b6.png
  17. Under client secrets click new client secret.
  18. Add a description and an expiration or the client secret.

    clipboard_e2d2f8cdce7e7299c10378663bca92651.png
  19. Click add.

    It is now important to record the Value provided in the Client Secrets section for use later. This information will not be displayed again.


    clipboard_e77a67632dc3e15e01371a9fc7e250f53.png
  20. Repeat as necessary for each region or subscription in Azure.

Configuring FireScope

Microsoft Azure Connection Credential

Now that one or many Service Principal credentials have been created. The next step is to add to FireScope's Connection Credentials.

  1. Log into your FireScope account.
  2. In the left menu expand configuration, expand connection credentials, click create.

    clipboard_e85ce2175663d7487776da3fa55c7a3c4.png
  3. Select the edge device intend for this discovery.

    clipboard_efcabc6ece0c926a0a0849ba58da74f7d.png

    The Edge Device does not have to be in Azure itself, but it will need to be allowed to access Azure from its location.

  4. Select Microsoft Azure.

    clipboard_ee22fdf050e962e6ce08e396964317abc.png
  5. Use the Name and Description fields to provide proper naming.
  6. Enter the application (client) ID, directory (tenant) ID, and the client Secret ID provided from the previous steps in Azure.

    clipboard_ec80b829aaba2b6db3911f65b07517522.png
  7. Verify all fields are correct and click save.
  8. Repeat as necessary per credential created in the Azure steps above.

Microsoft Azure Discovery Job

Now that Azure discovery credential(s) are created, Discovery Jobs may be created (one per credential).

  1. In the left menu expand configuration, expand discovery jobs, and click create.

    clipboard_e3a3646fb2fdfb1511b8688b75c760a9e.png
  2. Enter Name, select Edge Device from list, select Microsoft Azure from job type list, and toggle the Enable job in the upper right of the form.

    clipboard_eba689924f2415d6e3831ce52dd28f53b.png
  3. Frequency and Timeout value are defaulted but are editable.
    • Frequency is how often this job will run from the time it finishes
    • Timeout is how long to wait before the job will quit due to errors.
  4. In the Microsoft Azure discovery settings section, click the pencil icon and choose from the list of credentials you have already created for this job.

    clipboard_eac9ea99dc9a47eb36d98bccffc7a1a14.png
  5. In the Result Processing options, all the defaults are already toggled for you all you need to do at this point.
  6. Click save.

Discovery Job Results

After saving your discovery form, you will be taken to the discovery jobs list. Here, all discovery jobs are listed by category. In the Microsoft Azure section, you will see your job will be pending.

clipboard_e0cfa20f0c58f09a3a8bdbbf6c0b35a35.png

This pending state will continue for some time. Refresh the page using the refresh icon in the bottom right corner of the grid.

clipboard_ee7c13fb7fed860fc32e1bfe652afa51f.png

Eventually you will see that your job has run and completed.

clipboard_e133cf0c551bbe2f8843dcbc0f70cdb0e.png

You can then click on the ‘3 dots’ menu on the far right of the row and select view results to see what has been found.

clipboard_e0aa774e3337df4cdd1edd393e43a3889.png

Here, you’ll find a list of VMs found and data on each one.

clipboard_eaad1b3e1407e9320da8016eef9b0c09a.png

  • Was this article helpful?