[BUG] Cannot create a Managed application definition
See original GitHub issueDescribe the bug I am trying to create a Managed Application Definition. My request failed because of “InvalidRequestContent” exception. I turned on logging and noticed that the body of the request doesn’t include ‘properties’. Code snippet and screenshot of the request details are attached. Please find them below.
Exception or Stack Trace InvalidRequestContent due to missed data in the request’s body
To Reproduce Please try code snippet below.
Code Snippet `
var managedAppDefProperties =
new
{
lockLevel = "ReadOnly",
displayName = "test",
description = "test",
packageFileUri = packageFileUri,
authorizations = new object[] { new { principalId = principalId, roleDefinitionId = roleDefinitionId } }
};
azureClient.GenericResources
.Define(managedAppDefName)
.WithRegion(region)
.WithExistingResourceGroup(existingResourceGroup)
.WithResourceType("applicationDefinitions")
.WithProviderNamespace("Microsoft.Solutions")
.WithoutPlan()
.WithApiVersion("2019-07-01")
.WithProperties(managedAppDefProperties)
.WithTag("key", "value")
.Create();
`
Expected behavior Request body should contain defined properties
Screenshots
Setup (please complete the following information):
- OS: Windows 10
- IDE : Visual Studio 2019
- Version of the Library used: 1.38.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Can't deploy my Managed Application from Azure ...
I created Azure Managed Application. I successful deployed it to my subscription over Service catalog managed application definitions like ...
Read more >Azure Managed Application randomly fails to provision
Managed resource group is created however no deployment is scheduled for it. This behaviour is random. It used to work more stable. The ......
Read more >Issues · Azure/azure-libraries-for-net
Net. Contribute to Azure/azure-libraries-for-net development by creating an account on GitHub. ... [BUG] Cannot create a Managed application definition.
Read more >Managed application deployment failes when policy ...
Is it possible to create managed resource group with proper tags using managed application definition? Azure Managed Applications.
Read more >Cannot access the organization that I created
New AAD-backed Azure DevOps Services orgs have their “External guest access” policy disabled by default. This means AAD guests can't log into ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sergiygetlin
The object to
withProperties
is to be serialized to JSON.I am not sure what type will be created via the syntax in your code. Could you try
IDictionary
?Yes that was my initial assumption. Fluent flow allows to call methods in a certain order. I couldn’t find WithKind. I checked with reflector this assembly “Microsoft.Azure.Management.ResourceManager.Fluent.dll” and didn’t find anything. It is not critical, but just want to find out how to do it in fluent way. Just in case…
I partially switched to the new SDK.