We were able to create the bacpac using the below command,
C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin>
sqlpackage.exe /Action:Export /ssn:. /sdn:demo /tf:d:\bacpac\demo.bacpac
However we want to automate the below action,
Also can this be done via SSMS using something similar
BACKUP DATABASE demo
TO URL = @FullName
WITH CREDENTIAL = democredential;
You can use Azcopy to upload those bacpac files to an Azure BLOB Storage account as shown below:
AzCopy /Source:"d:\bacpac" /Dest:"https://exampleaccount.blob.core.windows.net/bacpacs" /DestKey:storageaccountkey /Pattern:*.bacpac
Hope this helps.