Description
Description
Get-AzWebApp throws:
Microsoft.Rest.SerializationException:
Unable to deserialize the response.
Inner Exception:
Error converting value "FileShare" to type
Microsoft.Azure.Management.WebSites.Models.AzureStorageType
Requested value 'FileShare' was not found.
This happens if you have a file share (e.g. a SMB on-premises share) configured for your logic app standard
Reproduction
Get-AzWebApp -ResourceGroupName "my-rg"
-Name "my-logicapp"
Relevant JSON
"azureStorageAccounts": {
"FileSystem": {
"type": "FileShare"
}
}
Issue script & Debug output
$DebugPreference='Continue'
Get-AzWebApp -ResourceGroupName "<REDACTED>" -Name "<REDACTED>" -ErrorAction Stop
Environment data
Name Value
---- -----
PSVersion 7.5.1
PSEdition Core
GitCommitId 7.5.1
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Module versions
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 5.5.2 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 10.1.0 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
Script 4.0.0 Az.Websites {Add-AzWebAppAccessRestrictionRule, Add-AzWebAppTrafficRouting, Edit-AzWebAppBackupConfiguration, Get-AzAppServiceEnvironment…}
Error output
DEBUG: 3:24:38 PM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
Message : Error converting value "FileShare" to type 'System.Nullable`1[Microsoft.Azure.Management.WebSites.Models.AzureStorageType]'. Path 'properties.azureStorageAccounts.FileSystem.type', line 1,
position 4306.
StackTrace : at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty
containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract
containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract
containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty,
String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract
containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract
containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Microsoft.Rest.Serialization.TransformationJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings settings)
at Microsoft.Azure.Management.WebSites.WebAppsOperations.GetConfigurationWithHttpMessagesAsync(String resourceGroupName, String name, Dictionary`2 customHeaders, CancellationToken
cancellationToken)
Exception : Newtonsoft.Json.JsonSerializationException
InvocationInfo : {Get-AzWebApp}
Line : Get-AzWebApp `
Position : At line:1 char:1
+ Get-AzWebApp `
+ ~~~~~~~~~~~~~~
HistoryId : 4
DEBUG: 3:24:38 PM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
Message : Requested value 'FileShare' was not found.
StackTrace : at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)
at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
Exception : System.ArgumentException
InvocationInfo : {Get-AzWebApp}
Line : Get-AzWebApp `
Position : At line:1 char:1
+ Get-AzWebApp `
+ ~~~~~~~~~~~~~~
HistoryId : 4
Description
Description
Get-AzWebApp throws:
Microsoft.Rest.SerializationException:
Unable to deserialize the response.
Inner Exception:
Error converting value "FileShare" to type
Microsoft.Azure.Management.WebSites.Models.AzureStorageType
Requested value 'FileShare' was not found.
This happens if you have a file share (e.g. a SMB on-premises share) configured for your logic app standard
Reproduction
Get-AzWebApp
-ResourceGroupName "my-rg"-Name "my-logicapp"
Relevant JSON
"azureStorageAccounts": {
"FileSystem": {
"type": "FileShare"
}
}
Issue script & Debug output
Environment data
Module versions
Error output