Azure Function App Flex Consumption migration fails with ServerFarmCreationNotAllowed
I am trying to migrate an existing Linux Consumption Azure Function App to Flex Consumption, but the migration fails after the app passes the eligibility check.
I need to migrate this Function App from Linux Consumption to Flex Consumption so that I can use a newer Python version (3.13).
Debugged and confirmed this potential reasons:
- Microsoft.Web or Microsoft.App wasn’t fully registered. (checked both are registered)
- The subscription offer is still effectively restricted. (canada central is not restricted)
- An Azure Policy blocks plan creation. (confirmed there's no policy that blocks the creation)
Command I ran
az functionapp flex-migration start \
--source-name "<source-function-app>" \
--source-resource-group "<source-resource-group>" \
--name "<new-flex-function-app>" \
--resource-group "<target-resource-group>"
Result
The app passes the eligibility check:
Validating that the app '<source-function-app>' is eligible for Flex Consumption migration...
Source app '<source-function-app>' is eligible for Flex Consumption migration.
Then creation of the new Flex Consumption Function App fails:
Creating Flex Consumption function app '<new-flex-function-app>' in resource group '<target-resource-group>'...
Using source app's storage account '<source-storage-account>' for function app '<new-flex-function-app>'
There was an error creating the Flex Consumption function app. Please address the issue and try again.
The subscription 'ee8ce930-...-484a95bddbfa' is not allowed to create or update the serverfarm.
Azure troubleshooting detector output
The Azure Portal detector shows multiple occurrences of:
Detected SubscriptionNotAllowedToCreateOrUpdateServerfarm
Example 1:
Resource: ServerFarm - <serverfarm-name-1>
Last Error Timestamp: 2026-06-08 16:41:33
Last Error CorrelationId: 507ed0d3-564e-4f04-a278-f896d319268d
Total Number of Occurrences: 4
Error Message: The subscription 'ee8ce930-...-484a95bddbfa' is not allowed to create or update the serverfarm.
Not sure whether this subscription is blocked from creating Flex Consumption serverfarms in Canada Central, or whether there is a backend subscription restriction/quota/policy preventing Microsoft.Web/serverfarms creation?
We would like to migrate this Function App to Flex Consumption so it can support the required newer Python version.
-
Pravallika KV 17,025 Reputation points • Microsoft External Staff • Moderator
Hi @Pontem ,
Thanks for reaching out to Microsoft Q&A.
After further investigation, our backend team has implemented a fix to unblock the customer's subscription.
You can retry
az functionapp flex-migration startto complete the Flex Consumption migration. -
Pontem 0 Reputation points
@Pravallika KV Thank you for your response, these are the answers:
- I tried it but I cannot create a new flex consumption app (not in cli migration) - yes both in the same region and subscription.
- The role is Owner
- No, unfortunately the project should only be in the same resource group and subscription.
- below are the full --debug error output
- Linux Consumption app’s current runtime stack is Python v3.11
cli.azure.cli.command_modules.appservice.custom: There was an error creating the Flex Consumption function app. Please address the issue and try again. cli.azure.cli.core.azclierror: Traceback (most recent call last): File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 789, in _run_job result = cmd_copy(params) ^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 335, in __call__ return self.handler(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler return op(**command_args) ^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/appservice/custom.py", line 1278, in migrate_consumption_to_flex create_functionapp(cmd, resource_group, name, storage_account, flexconsumption_location=source.location, File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/appservice/custom.py", line 8507, in create_functionapp raise ex File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/appservice/custom.py", line 8405, in create_functionapp plan_info = create_flex_app_service_plan( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/appservice/custom.py", line 7788, in create_flex_app_service_plan poller = client.app_service_plans.begin_create_or_update(resource_group_name, name, plan_def) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/web/v2024_11_01/operations/_app_service_plans_operations.py", line 1502, in begin_create_or_update raw_result = self._create_or_update_initial( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/web/v2024_11_01/operations/_app_service_plans_operations.py", line 1401, in _create_or_update_initial raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden' Content: {"Code":"Forbidden","Message":"The subscription 'ee8ce930-9386-4f0d-832f-484a95bddbfa' is not allowed to create or update the serverfarm.","Target":null,"Details":[{"Message":"The subscription 'ee8ce930-9386-4f0d-832f-484a95bddbfa' is not allowed to create or update the serverfarm."},{"Code":"Forbidden"},{"ErrorEntity":{"ExtendedCode":"70001","MessageTemplate":"The subscription '{0}' is not allowed to create or update the serverfarm.","Parameters":["ee8ce930-9386-4f0d-832f-484a95bddbfa"],"Code":"Forbidden","Message":"The subscription 'ee8ce930-9386-4f0d-832f-484a95bddbfa' is not allowed to create or update the serverfarm."}}],"Innererror":null} During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 677, in execute raise ex File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 820, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 812, in _run_job return cmd_copy.exception_handler(ex) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/appservice/commands.py", line 46, in _ex_handler raise ex knack.util.CLIError: The subscription 'ee8ce930-9386-4f0d-832f-484a95bddbfa' is not allowed to create or update the serverfarm. cli.azure.cli.core.azclierror: The subscription 'ee8ce930-9386-4f0d-832f-484a95bddbfa' is not allowed to create or update the serverfarm. az_command_data_logger: The subscription 'ee8ce930-9386-4f0d-832f-484a95bddbfa' is not allowed to create or update the serverfarm. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fea8a069440>] az_command_data_logger: exit code: 1 cli.__main__: Command ran in 26.621 seconds (init: 0.067, invoke: 26.555) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 4345 in cache file under /home/pontem/.azure/telemetry/20260608192343142 telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "/usr/bin/python3.12 /usr/lib/az/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /home/pontem/.azure /home/pontem/.azure/telemetry/20260608192343142" telemetry.process: Return from creating process 1154 telemetry.main: Finish creating telemetry upload process.and these are the issue log in portal:
Detected SubscriptionNotAllowedToCreateOrUpdateServerfarm for ServerFarm - asp-pontem-644e
Description - The subscription xx is not allowed to create or update the serverfarm Recommended Action - If issue persists, please contact support with the timestamp and correlationId from Activity Logs or Deployment History Last Error TimeStamp -2026-06-08 16:41:33 Last Error CorrelationId - 507ed0d3-564e-4f04-a278-f896d319268d Total Number of Occurrences - 4 Error Message - The subscription 'ee8ce930-...-484a95bddbfa' is not allowed to create or update the serverfarm.
Detected SubscriptionNotAllowedToCreateOrUpdateServerfarm for DeploymentValidation - Microsoft.Web-FunctionApp-Portal-3abb8ed9-8d89
Description - The subscription xx is not allowed to create or update the serverfarm Recommended Action - If issue persists, please contact support with the timestamp and correlationId from Activity Logs or Deployment History Last Error TimeStamp - 2026-06-08 16:47:17 Last Error CorrelationId - 68172f92-1bf2-4a39-aafb-e90afb36e009 Total Number of Occurrences - 1 Error Message - The template deployment 'Microsoft.Web-FunctionApp-Portal-3abb8ed9-8d89' is not valid according to the validation procedure. The following resource provider(s) - 'Microsoft.Web/serverFarms (2024-11-01)' reported preflight validation errors. Tracking id is '05ecfec8-b006-4407-bdcb-2970a3d61cef'. See inner errors for details. Error code:ServerFarmCreationNotAllowed message:The subscription 'ee8ce930-...-484a95bddbfa' is not allowed to create or update the serverfarm.
-
Pravallika KV 17,025 Reputation points • Microsoft External Staff • Moderator
Could you please share the details requested over private message? @Pontem
-
Pravallika KV 17,025 Reputation points • Microsoft External Staff • Moderator
Hi @Pontem , could you check now and confirm if the issue is resolved?
Sign in to comment
