Unable to create Azure host using Galleries

Problem:

When trying to create a new Azure host using a gallery image, we receive an error:

“message”: “MsRestAzure::AzureOperationError: InvalidParameter: The value of parameter imageReference.publisher is invalid.”

Expected outcome:

Ability to create an Azure instance using a gallery image

Foreman and Proxy versions:

Foreman 1.24
Proxy 1.24

Foreman and Proxy plugin versions:

tfm-rubygem-foreman_azure_rm-2.1.2-1.fm2_2.el7

Distribution and version:

Other relevant data:

Paths to images:

Images using this path work as expected:

/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/azr-images/providers/Microsoft.Compute/images/<image_name>

Images using this path do not work as expected:

/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/azr-linux-workstation-foreman/providers/Microsoft.Compute/galleries/myGallery/images/<image_name>

Full error:

Failed to create a compute (Azure Resource Manager) instance xxxxxxxx.domain.com: { “message”: “MsRestAzure::AzureOperationError: InvalidParameter: The value of parameter imageReference.publisher is invalid.”, “request”: { “base_uri”: “https://management.azure.com”, “path_template”: “subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}”, “method”: “put”, “path_params”: { “resourceGroupName”: “azr-linux-workstation-foreman”, “vmName”: “xxxxxxxx”, “subscriptionId”: “xxxxxxxxxxxxxxxxxxxxxx” }, “skip_encoding_path_params”: null, “query_params”: { “api-version”: “2019-03-01” }, “skip_encoding_query_params”: null, “headers”: { “Content-Type”: “application/json; charset=utf-8”, “Accept”: “application/json”, “accept-language”: “en-US”, “x-ms-client-request-id”: “xxxxxxxxxxxxxxxxxxxxxxxxxx” }, “body”: "{“location”:“westus2”,“properties”:{“hardwareProfile”:{“vmSize”:“Standard_NV12s_v3”},“storageProfile”:{“imageReference”:{},“osDisk”:{“osType”:“Linux”,“name”:“xxxxxxx-osdisk”,“createOption”:“FromImage”,“managedDisk”:{“storageAccountType”:“Standard_LRS”}}},“osProfile”:{“computerName”:“xxxxxxxx”,“adminUsername”:“xxxxxxx”,“adminPassword”:“xxxxxxx”,“linuxConfiguration”:{“disablePasswordAuthentication”:false,“ssh”: