question

WillHasey-9647 avatar image
0 Votes"
WillHasey-9647 asked WillHasey-9647 commented

Azure Active Directory Domain Services: The operation failed because resource is in the: 'Failed' state

When I run this cmdlet using a powershell script,

New-AzResource -ResourceId "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/will-vnet-rg/providers/Microsoft.AAD/DomainServices/xxxxx.xxxxxxxx.com" -Location eastus2 -Properties @{"DomainName"="xxxxx.xxxxxxxx.com"; "SubnetId"="/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/will-vnet-rg/providers/Microsoft.Network/virtualNetworks/will-vnet/subnets/will-core-subnet"} -ApiVersion 2017-06-01 -Force -Verbose


I get this error,


New-AzResource : The operation failed because resource is in the: 'Failed' state. Please check the logs for more details.
At C:\tf\advantage\dev\deploy\scripts\Azure-Functions.ps1:89 char:5
+     New-AzResource -ResourceId "/subscriptions/$subscription/resource ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzResource], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceCmdlet



The resources it depends on exist, earlier in my script I create them. I am able to create the Domain Service manually through the Azure Portal, however, using the PowerShell cmdlet to create it does not work.

In the portal, the resource says "The managed domain is in a failed state. Contact support with your Azure AD tenant ID and the domain name of the managed domain."

![Failed Domain in the portal][1]


azure-ad-domain-services
image.png (26.5 KiB)
5 |1600 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

JamesTran-MSFT avatar image
0 Votes"
JamesTran-MSFT answered WillHasey-9647 commented

@WillHasey-9647
Thank you for your post!

Based off the PS command you posted, it looks like you're trying to create a Subnet within your AADDS instance. You can try to Create a virtual network subnet using the Azure Portal, but if your domain service is in a failed state, I'd recommend reaching out to our support team via a Support Request so they can take a closer look into your AADDS environment since it's in a failed state.


If you have any other questions or need assistance creating the support request, please let me know.
Thank you for your time and patience throughout this issue.


Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

· 2
5 |1600 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.

@WillHasey-9647
I just wanted to check in and see if you had any other questions or if you were able to resolve this issue?

0 Votes 0 ·

Hi,

Thanks for the response. I thought of another solution after posting which looks promising so far. If I run into difficulties with this I will submit a support ticket and let you know from there.

0 Votes 0 ·