Errors I faced when handling with Azure power shell
Install Azure power shell
This indicates the windows PowerShell version is too low to meet the minimum requirement for Azure PowerShell. You need to update it to at least 5.1 and then can proceed with Azure PowerShell installationLogin-AzureRMAccount
From below overview of Azure power shell, we know there are 2 modules for Azure power shell, meaning there are 2 different sets of Azure commands you can use to run the Azure power shell commands. Unfortunately, the white paper is using the AzureRM module and I was not able to go through successfully. Instead, Az module works well for me. So, I recommend you use Az module as well to proceed. Az module is also recommended as you can see from below overview screenshot. Use Connect-AzAccount instead to proceed. Enter your Azure subscription account in below screen Step 3 to check and select the Azure subscription ID. Create the service bus with power shell command. Note you need to create the resource group manually on Azure portal before your run the command. Otherwise you will face below error. Note the diagram in whitepaper to elaborate this command is really confusing and sort of wrong. Below is screenshot from whitepaper to elaborate the power shell commands to create service bus, however it’s using AzureRM and has some issue in particular with explanation of the parameters. Below is my sample command I used to create my service bus. You can simply follow it to create your own service bus. New-AzServiceBusNamespace -ResourceGroupName LeoResourceGroup20190115 -NamespaceName LeoServiceBus20190115 -Location ‘Southeast Asia’ It will take less than 1min to create the service bus with the Azure PS. Then you’ll get below output. Save it somewhere. In summary, below is a mapping between the commands in the whitepaper and commands for Az module –Orignal command in whitepaper | Description | Resolution/Sample commands in my lab |
Install-Module -Name Az -AllowClobber | Install Azure PS | Check windows PS version. Make sure 5.1 at a minimum. |
Login-AzureRmAccount | Connect Azure PS with your Azure subscription | Connect-AzAccount |
Get-AzureRmSubscription | learn the subscriptions that are available and then select one of them | Get-AzSubscription |
Select-AzureRmSubscription -SubscriptionId <“subscriptionId”> | learn the subscriptions that are available and then select one of them | Select-AzSubscription -SubscriptionId “your Azure subscription ID” |
New-AzureRmServiceBusNamespace -ResourceGroupName <-resourceGroupName-> -NamespaceName <-serviceBusName-> -Location <-WestUS-> | Create Service bus with Azure PS | New-AzServiceBusNamespace -ResourceGroupName LeoResourceGroup20190115 -NamespaceName LeoServiceBus20190115 -Location ‘Southeast Asia’ |
Mobile connector
As of now (Feb 2019), version of the latest mobile connector is 8.2.387.0. Note – you always need to download the latest mobile connector from above link to configure this feature. Due to the topology change, old connector doesn’t support latest SAS.Side notes for connector–
- Mobile connector doesn’t have to be installed in AOS servers. You can install it on any server you like. No AX component is required for mobile connector.
- If you run into below error when opening mobile connector UI, this is because the mobile connector service is in Stopped status. Simply start it from windows service list then you’ll be good to fix this issue and start the UI.
- ADFS is not required for workflow approval via email. So, you can enter any value when configuring parameters on connector UI for ADFS. Only 4 parameters as below are required for workflow approval via email. All rest you can just provide some dummy values for them.
-
- Azure service namespace – it’s the service bus name LeoServiceBus20190115
- Azure service identity name – use default sendlisten
- Azure service identity password – primary key in SB > SAS > Primary key
- Endpoint URI of EmailApprovalsServices – Just replace the placeholder which is the AOS name. Sample : net.tcp://DAX2012R3:8201/DynamicsAx/Services/EmailApprovalsServices