Enabling managed identities on Azure during deployment
On the Azure platform, you can enable managed identities from the Azure portal as well as ARM templates during deployment, Azure CLI, PowerShell, or Azure Cloud Shell.
To enable system-assigned managed identities, the Microsoft.Compute/virtualMachines resource for the FortiGate must have the "identity" property added at the same level as the"type": "Microsoft.Compute/virtualMachines" property.
"identity": {
"type": "SystemAssigned"
},
See Configure managed identities for Azure resources on an Azure VM using a templates.