dyn365-ce-vsts-tasks
dyn365-ce-vsts-tasks copied to clipboard
Cannot provision a new dynamics instance from pipeline
I am facing an issue while Provisioning new dynamics instance from pipeline, it says,
I am using 'Provision new instance' with Power Devops tools.
Errors encountered : Tenant does not have licenses for provisioning an additional org. No additional instances are available.
I have checked my subscription and I can create a new instance from power platform admin, but cannot create it automatically from pipeline.
See logs below:
`2020-05-08T08:15:58.6588120Z ##[debug]Evaluating condition for step: 'Provision release-env'
2020-05-08T08:15:58.6592607Z ##[debug]Evaluating: succeeded()
2020-05-08T08:15:58.6593248Z ##[debug]Evaluating succeeded:
2020-05-08T08:15:58.6597086Z ##[debug]=> True
2020-05-08T08:15:58.6597799Z ##[debug]Result: True
2020-05-08T08:15:58.6598451Z ##[section]Starting: Provision release-env
2020-05-08T08:15:58.6777986Z ==============================================================================
2020-05-08T08:15:58.6778357Z Task : Provision Online Instance
2020-05-08T08:15:58.6778744Z Description : Creates a new PowerApps/CDS/Dynamics 365 environment
2020-05-08T08:15:58.6779067Z Version : 12.0.7
2020-05-08T08:15:58.6779326Z Author : Wael Hamze
2020-05-08T08:15:58.6779828Z Help : This task uses the (Microsoft.Xrm.OnlineManagementAPI)[https://www.powershellgallery.com/packages/Microsoft.Xrm.OnlineManagementAPI]
2020-05-08T08:15:58.6780414Z ==============================================================================
2020-05-08T08:15:59.4689840Z ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c
2020-05-08T08:15:59.5822770Z ##[debug]Entering MSCRMProvisionOnlineInstance.ps1
2020-05-08T08:15:59.6080262Z ##[debug]INPUT_APIURL: 'https://admin.services.crm4.dynamics.com'
2020-05-08T08:15:59.6115455Z ##[debug]INPUT_USERNAME: '[email protected]'
2020-05-08T08:15:59.6147572Z ##[debug]INPUT_PASSWORD: '????????'
2020-05-08T08:15:59.6178354Z ##[debug]INPUT_DOMAINNAME: 'release-env'
2020-05-08T08:15:59.6207363Z ##[debug]INPUT_FRIENDLYNAME: 'release-environment'
2020-05-08T08:15:59.6240355Z ##[debug]INPUT_PURPOSE (empty)
2020-05-08T08:15:59.6322659Z ##[debug]INPUT_INITIALUSEREMAIL: '[email protected]'
2020-05-08T08:15:59.6353788Z ##[debug]INPUT_INSTANCETYPE: 'Sandbox'
2020-05-08T08:15:59.6492306Z ##[debug]INPUT_SERVICEVERSION: 'bce9abbf-90fd-42e7-b0e5-1ced6df22fa1'
2020-05-08T08:15:59.6525344Z ##[debug]INPUT_SALES: 'true'
2020-05-08T08:15:59.6567785Z ##[debug] Converted to bool: True
2020-05-08T08:15:59.6598421Z ##[debug]INPUT_CUSTOMERSERVICE: 'false'
2020-05-08T08:15:59.6624412Z ##[debug] Converted to bool: False
2020-05-08T08:15:59.6654317Z ##[debug]INPUT_FIELDSERVICE: 'false'
2020-05-08T08:15:59.6678723Z ##[debug] Converted to bool: False
2020-05-08T08:15:59.6710142Z ##[debug]INPUT_PROJECTSERVICE: 'false'
2020-05-08T08:15:59.6735330Z ##[debug] Converted to bool: False
2020-05-08T08:15:59.6766976Z ##[debug]INPUT_LANGUAGEID: '1033'
2020-05-08T08:15:59.6831813Z ##[debug] Converted to int: 1033
2020-05-08T08:15:59.6864186Z ##[debug]INPUT_CURRENCYCODE (empty)
2020-05-08T08:15:59.6902859Z ##[debug]INPUT_CURRENCYNAME (empty)
2020-05-08T08:15:59.6933433Z ##[debug]INPUT_CURRENCYPRECISION (empty)
2020-05-08T08:15:59.6959160Z ##[debug] Converted to int: 0
2020-05-08T08:15:59.6991549Z ##[debug]INPUT_CURRENCYSYMBOL (empty)
2020-05-08T08:15:59.7035086Z ##[debug]INPUT_SECURITYGROUPID (empty)
2020-05-08T08:15:59.7068792Z ##[debug]INPUT_SECURITYGROUPNAME (empty)
2020-05-08T08:15:59.7108278Z ##[debug]INPUT_WAITFORCOMPLETION: 'true'
2020-05-08T08:15:59.7139404Z ##[debug] Converted to bool: True
2020-05-08T08:15:59.7179381Z ##[debug]INPUT_SLEEPDURATION: '5'
2020-05-08T08:15:59.7431767Z ##[debug] Converted to int: 5
2020-05-08T08:15:59.7672864Z ##[debug]MSCRM Tools Path: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:15:59.7673690Z ##[debug]Entering MSCRMToolFunctions.ps1
2020-05-08T08:15:59.7674311Z ##[debug]Leaving MSCRMToolFunctions.ps1
2020-05-08T08:15:59.8456273Z ##[debug]MSCRM Tools Path: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:15:59.8555128Z ##[debug]Getting Microsoft.Xrm.OnlineManagementAPI details from C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28\Tools.json
2020-05-08T08:15:59.8757191Z ##[debug]Using default version: 1.2.0.1
2020-05-08T08:15:59.8788031Z Downloading Microsoft.Xrm.OnlineManagementAPI 1.2.0.1 to: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:15:59.8890393Z ##[debug]Nuget command: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28\Nuget\4.9.4\nuget.exe install Microsoft.Xrm.OnlineManagementAPI -OutputDirectory C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28 -ConfigFile D:\a_temp\917bf9c0-af69-4918-b01b-f7ac25684cac\ps.nuget.config -NonInteractive -Version 1.2.0.1
2020-05-08T08:16:07.2645823Z ##[debug]Feeds used:
2020-05-08T08:16:07.2674557Z ##[debug] https://www.powershellgallery.com/api/v2
2020-05-08T08:16:07.2700567Z ##[debug]
2020-05-08T08:16:07.2727578Z ##[debug]
2020-05-08T08:16:07.2752719Z ##[debug]
2020-05-08T08:16:07.3437390Z ##[debug]Attempting to gather dependency information for package 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1' with respect to project 'C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28', targeting 'Any,Version=v0.0'
2020-05-08T08:16:07.3461558Z ##[debug]Gathering dependency information took 2.28 sec
2020-05-08T08:16:07.3483964Z ##[debug]Attempting to resolve dependencies for package 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1' with DependencyBehavior 'Lowest'
2020-05-08T08:16:07.3505368Z ##[debug]Resolving dependency information took 0 ms
2020-05-08T08:16:07.3528190Z ##[debug]Resolving actions to install package 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1'
2020-05-08T08:16:07.3553561Z ##[debug]Resolved actions to install package 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1'
2020-05-08T08:16:07.3580467Z ##[debug]Retrieving package 'Microsoft.Xrm.OnlineManagementAPI 1.2.0.1' from 'PowerShell Gallery'.
2020-05-08T08:16:07.3602764Z ##[debug] GET https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1
2020-05-08T08:16:07.3622966Z ##[debug] InternalServerError https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1 328ms
2020-05-08T08:16:07.3643096Z ##[debug]WARNING: Error downloading 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1' from 'https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1'.
2020-05-08T08:16:07.3668406Z ##[debug]Response status code does not indicate success: 500 (The specified cast from a materialized 'System.Int32' type to the 'System.String' type is not valid.).
2020-05-08T08:16:07.3699219Z ##[debug] GET https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1
2020-05-08T08:16:07.3723056Z ##[debug] InternalServerError https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1 431ms
2020-05-08T08:16:07.3748125Z ##[debug]WARNING: Error downloading 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1' from 'https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1'.
2020-05-08T08:16:07.3778819Z ##[debug]Response status code does not indicate success: 500 (The specified cast from a materialized 'System.Int32' type to the 'System.String' type is not valid.).
2020-05-08T08:16:07.3811198Z ##[debug] GET https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1
2020-05-08T08:16:07.3837872Z ##[debug] OK https://www.powershellgallery.com/api/v2/package/Microsoft.Xrm.OnlineManagementAPI/1.2.0.1 648ms
2020-05-08T08:16:07.3886004Z ##[debug]Installing Microsoft.Xrm.OnlineManagementAPI 1.2.0.1.
2020-05-08T08:16:07.3923204Z ##[debug]Adding package 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1' to folder 'C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28'
2020-05-08T08:16:07.3948929Z ##[debug]Added package 'Microsoft.Xrm.OnlineManagementAPI.1.2.0.1' to folder 'C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28'
2020-05-08T08:16:07.3976221Z ##[debug]Successfully installed 'Microsoft.Xrm.OnlineManagementAPI 1.2.0.1' to C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:16:07.4007543Z ##[debug]Executing nuget actions took 3.16 sec
2020-05-08T08:16:07.4083773Z ##[debug]MSCRM Tools Path: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:16:07.4221079Z ##[debug]MSCRM Tools Path: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:16:07.4249002Z ##[debug]Getting AzureAD details from C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28\Tools.json
2020-05-08T08:16:07.4292061Z ##[debug]Using default version: 2.0.2.52
2020-05-08T08:16:07.4310101Z Downloading AzureAD 2.0.2.52 to: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:16:07.4337046Z ##[debug]Nuget command: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28\Nuget\4.9.4\nuget.exe install AzureAD -OutputDirectory C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28 -ConfigFile D:\a_temp\917bf9c0-af69-4918-b01b-f7ac25684cac\ps.nuget.config -NonInteractive -Version 2.0.2.52
2020-05-08T08:16:30.3636939Z ##[debug]Feeds used:
2020-05-08T08:16:30.3658575Z ##[debug] C:\Users\VssAdministrator.nuget\packages
2020-05-08T08:16:30.3679884Z ##[debug] https://www.powershellgallery.com/api/v2
2020-05-08T08:16:30.3701080Z ##[debug]
2020-05-08T08:16:30.3795993Z ##[debug]
2020-05-08T08:16:30.3823005Z ##[debug]
2020-05-08T08:16:30.3846942Z ##[debug]Attempting to gather dependency information for package 'AzureAD.2.0.2.52' with respect to project 'C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28', targeting 'Any,Version=v0.0'
2020-05-08T08:16:30.3869770Z ##[debug]Gathering dependency information took 893.29 ms
2020-05-08T08:16:30.3896561Z ##[debug]Attempting to resolve dependencies for package 'AzureAD.2.0.2.52' with DependencyBehavior 'Lowest'
2020-05-08T08:16:30.3918206Z ##[debug]Resolving dependency information took 0 ms
2020-05-08T08:16:30.3941675Z ##[debug]Resolving actions to install package 'AzureAD.2.0.2.52'
2020-05-08T08:16:30.3962605Z ##[debug]Resolved actions to install package 'AzureAD.2.0.2.52'
2020-05-08T08:16:30.3986657Z ##[debug]Retrieving package 'AzureAD 2.0.2.52' from 'PowerShell Gallery'.
2020-05-08T08:16:30.4012702Z ##[debug] GET https://www.powershellgallery.com/api/v2/package/AzureAD/2.0.2.52
2020-05-08T08:16:30.4031637Z ##[debug] OK https://www.powershellgallery.com/api/v2/package/AzureAD/2.0.2.52 661ms
2020-05-08T08:16:30.4060009Z ##[debug]Installing AzureAD 2.0.2.52.
2020-05-08T08:16:30.4086198Z ##[debug]Adding package 'AzureAD.2.0.2.52' to folder 'C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28'
2020-05-08T08:16:30.4109983Z ##[debug]Added package 'AzureAD.2.0.2.52' to folder 'C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28'
2020-05-08T08:16:30.4134923Z ##[debug]Successfully installed 'AzureAD 2.0.2.52' to C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:16:30.4159571Z ##[debug]Executing nuget actions took 21.22 sec
2020-05-08T08:16:30.4187255Z ##[debug]MSCRM Tools Path: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28
2020-05-08T08:16:30.4346558Z ##[debug]Entering BackupCRMOnlineInstance.ps1
2020-05-08T08:16:30.4371412Z ##[debug]ApiUrl = https://admin.services.crm4.dynamics.com
2020-05-08T08:16:30.4394741Z ##[debug]Username = [email protected]
2020-05-08T08:16:30.4420327Z ##[debug]DomainName = release-env
2020-05-08T08:16:30.4442701Z ##[debug]FriendlyName = release-environment
2020-05-08T08:16:30.4466013Z ##[debug]Purpose =
2020-05-08T08:16:30.4491215Z ##[debug]InitialUserEmail = [email protected]
2020-05-08T08:16:30.4517808Z ##[debug]InstanceType = Sandbox
2020-05-08T08:16:30.4541561Z ##[debug]ReleaseId = bce9abbf-90fd-42e7-b0e5-1ced6df22fa1
2020-05-08T08:16:30.4584898Z ##[debug]TemplateNames = D365_Sales
2020-05-08T08:16:30.4609939Z ##[debug]LanguageId = 1033
2020-05-08T08:16:30.4636460Z ##[debug]CurrencyCode =
2020-05-08T08:16:30.4660721Z ##[debug]CurrencyName =
2020-05-08T08:16:30.4685671Z ##[debug]CurrencyPrecision = 0
2020-05-08T08:16:30.4709729Z ##[debug]CurrencySymbol =
2020-05-08T08:16:30.4734382Z ##[debug]SecurityGroupId =
2020-05-08T08:16:30.4758321Z ##[debug]SecurityGroupName =
2020-05-08T08:16:30.4782709Z ##[debug]WaitForCompletion = True
2020-05-08T08:16:30.4807788Z ##[debug]SleepDuration = 5
2020-05-08T08:16:30.4831271Z ##[debug]PSModulePath = C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28\Microsoft.Xrm.OnlineManagementAPI.1.2.0.1
2020-05-08T08:16:30.4855217Z ##[debug]AzureADModulePath = C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28\AzureAD.2.0.2.52
2020-05-08T08:16:30.4880890Z ##[debug]Script Path: C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28\xRMCIFramework\9.0.0
2020-05-08T08:16:30.5017917Z ##[debug]Current Security Protocol: Tls, Tls11, Tls12, Tls13
2020-05-08T08:16:30.5187679Z ##[debug]Modified Security Protocol: Tls, Tls11, Tls12, Tls13
2020-05-08T08:16:30.5245637Z ##[debug]Importing Online Management Module: C:/hostedtoolcache/windows\MSCRMBuildTools\12.0.28\Microsoft.Xrm.OnlineManagementAPI.1.2.0.1\Microsoft.Xrm.OnlineManagementAPI.dll
2020-05-08T08:16:30.5287433Z ##[debug]Loading module from path 'C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28\Microsoft.Xrm.OnlineManagementAPI.1.2.0.1\Microsoft.Xrm.OnlineManagementAPI.dll'.
2020-05-08T08:16:30.5464932Z ##[debug]Importing cmdlet 'Backup-CrmInstance'.
2020-05-08T08:16:30.5485937Z ##[debug]Importing cmdlet 'Copy-CrmInstance'.
2020-05-08T08:16:30.5505845Z ##[debug]Importing cmdlet 'Get-CrmCurrencies'.
2020-05-08T08:16:30.5525560Z ##[debug]Importing cmdlet 'Get-CrmInstance'.
2020-05-08T08:16:30.5547722Z ##[debug]Importing cmdlet 'Get-CrmInstanceBackups'.
2020-05-08T08:16:30.5567042Z ##[debug]Importing cmdlet 'Get-CrmInstances'.
2020-05-08T08:16:30.5588391Z ##[debug]Importing cmdlet 'Get-CrmInstanceTypes'.
2020-05-08T08:16:30.5611294Z ##[debug]Importing cmdlet 'Get-CrmLanguages'.
2020-05-08T08:16:30.5633535Z ##[debug]Importing cmdlet 'Get-CrmOperationStatus'.
2020-05-08T08:16:30.5655859Z ##[debug]Importing cmdlet 'Get-CrmServiceVersions'.
2020-05-08T08:16:30.5676154Z ##[debug]Importing cmdlet 'Get-CrmTemplates'.
2020-05-08T08:16:30.5702696Z ##[debug]Importing cmdlet 'New-CrmAdminModeSetting'.
2020-05-08T08:16:30.5727067Z ##[debug]Importing cmdlet 'New-CrmInstanceCopyRequestInfo'.
2020-05-08T08:16:30.5748958Z ##[debug]Importing cmdlet 'New-CrmInstanceResetRequestInfo'.
2020-05-08T08:16:30.5773027Z ##[debug]Importing cmdlet 'Reset-CrmInstance'.
2020-05-08T08:16:30.5795185Z ##[debug]Importing cmdlet 'New-CrmInstance'.
2020-05-08T08:16:30.5816833Z ##[debug]Importing cmdlet 'New-CrmInstanceInfo'.
2020-05-08T08:16:30.5837661Z ##[debug]Importing cmdlet 'Restore-CrmInstance'.
2020-05-08T08:16:30.5859891Z ##[debug]Importing cmdlet 'Disable-CrmAdminMode'.
2020-05-08T08:16:30.5882438Z ##[debug]Importing cmdlet 'Disable-CrmManagementApp'.
2020-05-08T08:16:30.5904536Z ##[debug]Importing cmdlet 'Enable-CrmAdminMode'.
2020-05-08T08:16:30.5927172Z ##[debug]Importing cmdlet 'Enable-CrmManagementApp'.
2020-05-08T08:16:30.5949725Z ##[debug]Importing cmdlet 'Get-CrmProtectedInstances'.
2020-05-08T08:16:30.5971127Z ##[debug]Importing cmdlet 'New-CrmImportProtectionKey'.
2020-05-08T08:16:30.5991429Z ##[debug]Importing cmdlet 'Get-CrmRetrieveAvailableTenantProtectionKeys'.
2020-05-08T08:16:30.6011243Z ##[debug]Importing cmdlet 'Get-CrmRetrieveTenantProtectionKey'.
2020-05-08T08:16:30.6031569Z ##[debug]Importing cmdlet 'Get-CrmGenerateProtectionKey'.
2020-05-08T08:16:30.6053404Z ##[debug]Importing cmdlet 'Get-CrmFlights'.
2020-05-08T08:16:30.6073321Z ##[debug]Importing cmdlet 'Get-CrmInstanceType'.
2020-05-08T08:16:30.6096582Z ##[debug]Importing cmdlet 'Get-CrmManagementApp'.
2020-05-08T08:16:30.6116021Z ##[debug]Importing cmdlet 'Get-CrmManagementApps'.
2020-05-08T08:16:30.6136965Z ##[debug]Importing cmdlet 'Add-CrmFlightAudience'.
2020-05-08T08:16:30.6160513Z ##[debug]Importing cmdlet 'Remove-CrmFlightAudience'.
2020-05-08T08:16:30.6181582Z ##[debug]Importing cmdlet 'New-CrmManagementApp'.
2020-05-08T08:16:30.6206282Z ##[debug]Importing cmdlet 'Remove-CrmInstance'.
2020-05-08T08:16:30.6229583Z ##[debug]Importing cmdlet 'Remove-CrmManagementApp'.
2020-05-08T08:16:30.6253197Z ##[debug]Importing cmdlet 'Set-CrmUnlockTenantProtectedInstance'.
2020-05-08T08:16:30.6279283Z ##[debug]Importing cmdlet 'Set-CrmLockTenantProtectedInstances'.
2020-05-08T08:16:30.6307846Z ##[debug]Importing cmdlet 'Set-CrmTenantProtectionKey'.
2020-05-08T08:16:30.6330586Z ##[debug]Importing cmdlet 'Set-CrmProtectWithTenantKey'.
2020-05-08T08:16:30.6354585Z ##[debug]Importing cmdlet 'Set-CrmProtectWithMicrosoftKey'.
2020-05-08T08:16:30.6380380Z ##[debug]Imported Online Management Module
2020-05-08T08:16:30.6646257Z ##[debug]Entering OnlineInstanceFunctions.ps1
2020-05-08T08:16:30.6673372Z ##[debug]Leaving OnlineInstanceFunctions.ps1
2020-05-08T08:16:31.7100004Z ##[debug]Entering CrmInstanceInfo - ProcessRecord
2020-05-08T08:16:31.7126055Z ##[debug]Executing CrmInstanceInfo
2020-05-08T08:16:31.7151071Z ##[debug]Exiting CrmInstanceInfo - ProcessRecord : 00:00:00.0026133
2020-05-08T08:16:31.7242907Z ##[debug]Connecting to API server: https://admin.services.crm4.dynamics.com/
2020-05-08T08:16:31.7869689Z ##[debug]Entering NewCrmInstance - ProcessRecord
2020-05-08T08:16:31.7894241Z ##[debug]Executing NewCrmInstance
2020-05-08T08:16:36.8456631Z ##[debug]Requesting Authentication - Start
2020-05-08T08:16:36.8552394Z ##[debug]Requesting Authority From server - Start
2020-05-08T08:16:36.9630920Z ##[debug]Requesting Authority From server - Finished : 00:00:00.1125916
2020-05-08T08:16:38.1497001Z ##[debug]Requesting Authentication - Completed : 00:00:01.3052172
2020-05-08T08:16:40.1564675Z ##[debug]Exiting NewCrmInstance - ProcessRecord : 00:00:08.3663927
2020-05-08T08:16:40.1651181Z OperationId = 00000000-0000-0000-0000-000000000000
2020-05-08T08:16:40.1674870Z Status = Failed
2020-05-08T08:16:40.1904135Z ##[debug]Caught exception from task script.
2020-05-08T08:16:40.1943436Z ##[debug]Error record:
2020-05-08T08:16:40.2855077Z ##[debug]Errors encountered : Tenant does not have licenses for provisioning an additional org. No additional instances are available.
2020-05-08T08:16:40.2872962Z ##[debug]At C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28\xRMCIFramework\9.0.0\ProvisionOnlineInstance.ps1:154 char:5
2020-05-08T08:16:40.2889425Z ##[debug]+ throw "Errors encountered : $errorMessage"
2020-05-08T08:16:40.2906664Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-05-08T08:16:40.2924836Z ##[debug] + CategoryInfo : OperationStopped: (Errors encounte... are available.:String) [], RuntimeException
2020-05-08T08:16:40.2941034Z ##[debug] + FullyQualifiedErrorId : Errors encountered : Tenant does not have licenses for provisioning an additional org. N o additional instances are available.
2020-05-08T08:16:40.2957444Z ##[debug]
2020-05-08T08:16:40.2980250Z ##[debug]Script stack trace:
2020-05-08T08:16:40.3020998Z ##[debug]at <ScriptBlock>, C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.28\xRMCIFramework\9.0.0\ProvisionOnlineInstance.ps1: line 154
2020-05-08T08:16:40.3038529Z ##[debug]at <ScriptBlock>, D:\a_tasks\MSCRMProvisionOnlineInstance_75b16512-23b8-49bd-9f31-c56d491207ad\12.0.7\MSCRMProvisionOnlineInstance.ps1: line 75
2020-05-08T08:16:40.3053852Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-05-08T08:16:40.3070460Z ##[debug]at <ScriptBlock>, <No file>: line 22
2020-05-08T08:16:40.3086641Z ##[debug]at <ScriptBlock>, <No file>: line 18
2020-05-08T08:16:40.3102696Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-05-08T08:16:40.3128534Z ##[debug]Exception:
2020-05-08T08:16:40.3178190Z ##[debug]System.Management.Automation.RuntimeException: Errors encountered : Tenant does not have licenses for provisioning an additional org. No additional instances are available.
2020-05-08T08:16:40.3433540Z ##[error]Errors encountered : Tenant does not have licenses for provisioning an additional org. No additional instances are available.
2020-05-08T08:16:40.3445340Z ##[debug]Processed: ##vso[task.logissue type=error]Errors encountered : Tenant does not have licenses for provisioning an additional org. No additional instances are available.
2020-05-08T08:16:40.3452984Z ##[debug]Processed: ##vso[task.complete result=Failed]
2020-05-08T08:16:40.3897253Z ##[section]Finishing: Provision release-env`
@shsaraswat06 what type of instance are you creating from pipeline vs UI?
Hi @WaelHamze, got the same today. Trying to create a simple Sandbox environment.
I had this fail, then work.
Then a second time the pipeline failed but it had created the instance. Error was as the original poster, "Tenant does not have licenses for provisioning an additional org. No additional instances are available". (screenshot below)
The instance is fully functional which it said could not be created. (screenshot below)
Also, I note that the tool only allows picking Sales, whereas now there are two sales options in the power platform admin screen to pick when creating a new instance, (Sale Enterprise & Sales Professional).
@mjburley @MscrmTools @shsaraswat06 this looks like a licensing issue. Note this is using the online management API as opposed to the PowerApps API
https://docs.microsoft.com/en-us/powershell/module/microsoft.xrm.onlinemanagementapi/new-crminstance?view=pa-ps-latest
Are you trying to create a CDS instance without any Dynamics capabilities?