question

TakuyaTeraoka avatar image
0 Votes"
TakuyaTeraoka asked ·

An error occurred in Delegate resource management

I want to realize "Monitor Azure AD B2C with Azure Monitor".
So, I followed the documentation and ran the command.
azure-monitor

As a result, an error has occurred.
I'm looking for a solution.

 1.Connect-AzAccount -tenant xxxx.onmicrosoft.com
 2.Select-AzSubscription <subscription ID>
 3.New-AzDeployment -Name "AzureADB2C" `
                  -Location "japanwest" `
                  -TemplateFile "C:\work\rgDelegatedResourceManagement.json" `
                  -TemplateParameterFile "C:\work\rgDelegatedResourceManagement.parameters.json" `
                  -Verbose
 4.I got an error message.
    
 PS C:\WINDOWS\system32> New-AzDeployment -Name "AzureADB2C" `
 >>                  -Location "japanwest" `
 >>                  -TemplateFile "C:\work\rgDelegatedResourceManagement.json" `
 >>                  -TemplateParameterFile "C:\work\rgDelegatedResourceManagement.parameters.json" `
 >>                  -Verbose
 >>
 WARNING: Breaking changes in the cmdlet 'New-AzDeployment' :
 WARNING:  - The cmdlet 'New-AzSubscriptionDeployment' is replacing this cmdlet.
    
 WARNING: NOTE : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
 VERBOSE: 16:00:43 - Template is valid.
 VERBOSE: 16:00:44 - Create template deployment 'AzureADB2C'
 VERBOSE: 16:00:44 - Checking deployment status in 5 seconds
 VERBOSE: 16:00:49 - Checking deployment status in 5 seconds
 VERBOSE: 16:00:54 - Resource Microsoft.ManagedServices/registrationDefinitions '27108163-xxxx-xxxx-xxxx-xxxxxxxxxxxx' provisioning status is running
 VERBOSE: 16:00:54 - Checking deployment status in 11 seconds
 VERBOSE: 16:01:05 - Checking deployment status in 5 seconds
 VERBOSE: 16:01:10 - Resource Microsoft.Resources/deployments 'rgAssignment' provisioning status is running
 New-AzDeployment : 16:01:10 - Resource Microsoft.ManagedServices/registrationAssignments '8d0b7ad5-xxxx-xxxx-xxxx-xxxxxxxxxxxx' failed with message '{
   "error": {
     "code": "RegistrationAssignmentInvalidUpdate",
     "message": "Registration assignment '8d0b7ad5-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not allowed to update registration definition reference."
   }
 }'
 At line:1 char:1
 + New-AzDeployment -Name "AzureADB2C" `
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [New-AzDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureDeploymentCmdlet
    
 New-AzDeployment : 16:01:10 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
 At line:1 char:1
 + New-AzDeployment -Name "AzureADB2C" `
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [New-AzDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureDeploymentCmdlet
    
 New-AzDeployment : 16:01:10 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
 At line:1 char:1
 + New-AzDeployment -Name "AzureADB2C" `
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [New-AzDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureDeploymentCmdlet
    
 VERBOSE: 16:01:10 - Resource Microsoft.ManagedServices/registrationDefinitions '27108163-xxxx-xxxx-xxxx-xxxxxxxxxxxx' provisioning status is succeeded
 VERBOSE: 16:01:10 - Checking deployment status in 5 seconds
 New-AzDeployment : 16:01:16 - Resource Microsoft.Resources/deployments 'rgAssignment' failed with message '{
   "status": "Failed",
   "error": {
     "code": "ResourceDeploymentFailure",
     "message": "The resource operation completed with terminal provisioning state 'Failed'.",
     "details": [
       {
         "code": "DeploymentFailed",
         "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
         "details": [
           {
             "code": "BadRequest",
             "message": "{\r\n  \"error\": {\r\n    \"code\": \"RegistrationAssignmentInvalidUpdate\",\r\n    \"message\": \"Registration assignment '8d0b7ad5-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not allowed to update registration definition reference.\"\r\n  }\r\n}"
           }
         ]
       }
     ]
   }
 }'
 At line:1 char:1
 + New-AzDeployment -Name "AzureADB2C" `
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [New-AzDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureDeploymentCmdlet
    
 New-AzDeployment : 16:01:16 - At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
 At line:1 char:1
 + New-AzDeployment -Name "AzureADB2C" `
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [New-AzDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureDeploymentCmdlet
    
 New-AzDeployment : 16:01:16 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
 At line:1 char:1
 + New-AzDeployment -Name "AzureADB2C" `
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [New-AzDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureDeploymentCmdlet
    
 New-AzDeployment : 16:01:16 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
 At line:1 char:1
 + New-AzDeployment -Name "AzureADB2C" `
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [New-AzDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureDeploymentCmdlet
    
    
    
 DeploymentName          : AzureADB2C
 Location                : japanwest
 ProvisioningState       : Failed
 Timestamp               : 2020/05/22 7:01:13
 Mode                    : Incremental
 TemplateLink            :
 Parameters              :
                           Name                   Type                       Value
                           =====================  =========================  ==========
                           mspOfferName           String                     Azure AD B2C Managed Services
                           mspOfferDescription    String                     Enables Azure Monitor in Azure AD B2C
                           managedByTenantId      String                     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                           authorizations         Array                      [
                             {
                               "principalId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                               "roleDefinitionId": "b24988ac-6180-42a0-ab88-20f7382dd24c",
                               "principalIdDisplayName": "Azure AD B2C tenant administrator"
                             }
                           ]
                           rgName                 String                     rg-xxx
    
 Outputs                 :
 DeploymentDebugLogLevel :



8537-rgdelegatedresourcemanagementjson.txt
8538-rgdelegatedresourcemanagementparametersjson.txt



azure-ad-b2c
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered ·

Hi @TakuyaTeraoka-7828,

As per the error: At least one resource deployment operation failed. Please view deployment history and fix the error that you see in operation details as mentioned here: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-history?tabs=azure-portal.


Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @amanpreetsingh-msft

I checked the error message in Azure Portal.
However, the error message was the same as the one output by the command, and the solution was unknown.

 {"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{ "error": { "code": "RegistrationAssignmentInvalidUpdate", "message": "Registration assignment '8d0b7ad5-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not allowed to update registration definition reference." }}"}]}

0 Votes 0 ·