azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Set-AzWebApp: Unable to deserialize the response. on setting AzureStoragePath

Open pmarguerite-kayentis opened this issue 3 years ago • 2 comments

Description

I try to link an Application Service with an AzureBlobStorage. I run the Set-AzWebApp command with the AzureStoragePath parameter, but command fails with a ' Unable to deserialize the response' error:

Requested value 'NotValidated' was not found.

Issue script & Debug output

PS > $DebugPreference='Continue'
PS > Set-AzWebApp `
>>       -ResourceGroupName $webAppResourceGroupName `
>>       -Name $webAppName `
>>       -AzureStoragePath $webAppStoragePathObject `
>>       -Verbose
DEBUG: 9:49:06 AM - SetAzureWebAppCmdlet begin processing with ParameterSet 'S1'.
DEBUG: 9:49:06 AM - using account id 'XXXX'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'XXXX', environment: 'AzureCloud', tenant: 'YYYYYYYYYYY'
DEBUG: 9:49:06 AM - [ManagedServiceIdentityAuthenticator] Calling ManagedIdentityCredential.GetTokenAsync - TenantId:'YYYYYYYYYYY, Scopes:'https://management.core.windows.net/', UserId:''
DEBUG: ManagedIdentityCredential.GetToken invoked. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:
DEBUG: Request [YYYYYYYYYYY] GET http://169.254.169.254/metadata/identity/oauth2/token?api-version=REDACTED&resource=REDACTED
Metadata:REDACTED
x-ms-client-request-id:YYYYYYYYYYY
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.5.0,(.NET 6.0.6; Microsoft Windows 10.0.19043)
client assembly: Azure.Identity
DEBUG: Response [YYYYYYYYYYY] 200 OK (00.0s)
Server:IMDS/150.870.65.684
Date:Mon, 08 Aug 2022 07:49:06 GMT
Content-Type:application/json; charset=utf-8
Content-Length:1900

DEBUG: ManagedIdentityCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net/ ] ParentRequestId:  ExpiresOn: 2022-08-09T07:36:07.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'YYYYYYYYYYY', UserId: 'XXXX'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY?api-version=2020-06-01

Headers:
x-ms-client-request-id        : YYYYYYYYYYY
Accept-Language               : en-US

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
ETag                          : "1D8AAFB49B4DF95"
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYYYYYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-reads: 11991
x-ms-correlation-request-id   :YYYYYYYYYYY
x-ms-routing-request-id       : FRANCECENTRAL:YYYYYYYYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:05 GMT

Body:
{
  "id": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY",
  "name": "amp-YYYYYYYYYYY",
  "type": "Microsoft.Web/sites",
  "kind": "app,linux,container",
  "location": "France Central",
  "tags": {
    "deployment_time": "20220808-021821",
  },
  "properties": {
    "name": "amp-YYYYYYYYYYY",
    "state": "Running",
    "hostNames": [
      "amp-YYYYYYYYYYY.azurewebsites.net"
    ],
    "webSpace": "rg-YYYYYYYYYYY-FranceCentralwebspace-Linux",
    "selfLink": "https://waws-prod-par-019.api.azurewebsites.windows.net:454/subscriptions/YYYYYYYYYYY/webspaces/rg-YYYYYYYYYYY-FranceCentralwebspace-Linux/sites/amp-YYYYYYYYYYY",
    "repositorySiteName": "amp-YYYYYYYYYYY",
    "owner": null,
    "usageState": "Normal",
    "enabled": true,
    "adminEnabled": true,
    "enabledHostNames": [
      "amp-YYYYYYYYYYY.azurewebsites.net",
      "amp-YYYYYYYYYYY.scm.azurewebsites.net"
    ],
    "siteProperties": {
      "metadata": null,
      "properties": [
        {
          "name": "LinuxFxVersion",
          "value": "DOCKER|acrYYYYYYYYYYY.azurecr.io/ap/ap-docker:1.1.0-snapshot"
        },
        {
          "name": "WindowsFxVersion",
          "value": null
        }
      ],
      "appSettings": null
    },
    "availabilityState": "Normal",
    "sslCertificates": null,
    "csrs": [],
    "cers": null,
    "siteMode": null,
    "hostNameSslStates": [
      {
        "name": "amp-YYYYYYYYYYY.azurewebsites.net",
        "sslState": "Disabled",
        "ipBasedSslResult": null,
        "virtualIP": null,
        "thumbprint": null,
        "toUpdate": null,
        "toUpdateIpBasedSsl": null,
        "ipBasedSslState": "NotConfigured",
        "hostType": "Standard"
      },
      {
        "name": "amp-YYYYYYYYYYY.scm.azurewebsites.net",
        "sslState": "Disabled",
        "ipBasedSslResult": null,
        "virtualIP": null,
        "thumbprint": null,
        "toUpdate": null,
        "toUpdateIpBasedSsl": null,
        "ipBasedSslState": "NotConfigured",
        "hostType": "Repository"
      }
    ],
    "computeMode": null,
    "serverFarm": null,
    "serverFarmId": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/serverfarms/ASPYYYYYYYYYYY",
    "reserved": true,
    "isXenon": false,
    "hyperV": false,
    "lastModifiedTimeUtc": "2022-08-08T07:48:45.7533333",
    "storageRecoveryDefaultState": "Running",
    "contentAvailabilityState": "Normal",
    "runtimeAvailabilityState": "Normal",
    "vnetRouteAllEnabled": false,
    "siteConfig": {
      "numberOfWorkers": 1,
      "defaultDocuments": null,
      "netFrameworkVersion": null,
      "phpVersion": null,
      "pythonVersion": null,
      "nodeVersion": null,
      "powerShellVersion": null,
      "linuxFxVersion": "DOCKER|acrYYYYYYYYYYY.azurecr.io/ap/ap-docker:1.1.0-snapshot",
      "windowsFxVersion": null,
      "requestTracingEnabled": null,
      "remoteDebuggingEnabled": null,
      "remoteDebuggingVersion": null,
      "httpLoggingEnabled": null,
      "azureMonitorLogCategories": null,
      "acrUseManagedIdentityCreds": false,
      "acrUserManagedIdentityID": null,
      "logsDirectorySizeLimit": null,
      "detailedErrorLoggingEnabled": null,
      "publishingUsername": null,
      "publishingPassword": null,
      "appSettings": null,
      "metadata": null,
      "connectionStrings": null,
      "machineKey": null,
      "handlerMappings": null,
      "documentRoot": null,
      "scmType": null,
      "use32BitWorkerProcess": null,
      "webSocketsEnabled": null,
      "alwaysOn": true,
      "javaVersion": null,
      "javaContainer": null,
      "javaContainerVersion": null,
      "appCommandLine": null,
      "managedPipelineMode": null,
      "virtualApplications": null,
      "winAuthAdminState": null,
      "winAuthTenantState": null,
      "customAppPoolIdentityAdminState": null,
      "customAppPoolIdentityTenantState": null,
      "runtimeADUser": null,
      "runtimeADUserPassword": null,
      "loadBalancing": null,
      "routingRules": null,
      "experiments": null,
      "limits": null,
      "autoHealEnabled": null,
      "autoHealRules": null,
      "tracingOptions": null,
      "vnetName": null,
      "vnetRouteAllEnabled": null,
      "vnetPrivatePortsCount": null,
      "publicNetworkAccess": null,
      "cors": null,
      "push": null,
      "apiDefinition": null,
      "apiManagementConfig": null,
      "autoSwapSlotName": null,
      "localMySqlEnabled": null,
      "managedServiceIdentityId": null,
      "xManagedServiceIdentityId": null,
      "keyVaultReferenceIdentity": null,
      "ipSecurityRestrictions": null,
      "scmIpSecurityRestrictions": null,
      "scmIpSecurityRestrictionsUseMain": null,
      "http20Enabled": false,
      "minTlsVersion": null,
      "minTlsCipherSuite": null,
      "supportedTlsCipherSuites": null,
      "scmMinTlsVersion": null,
      "ftpsState": null,
      "preWarmedInstanceCount": null,
      "functionAppScaleLimit": 0,
      "healthCheckPath": null,
      "fileChangeAuditEnabled": null,
      "functionsRuntimeScaleMonitoringEnabled": null,
      "websiteTimeZone": null,
      "minimumElasticInstanceCount": 0,
      "azureStorageAccounts": null,
      "http20ProxyFlag": null,
      "sitePort": null,
      "antivirusScanEnabled": null,
      "storageType": null
    },
    "deploymentId": "amp-YYYYYYYYYYY",
    "slotName": null,
    "trafficManagerHostNames": null,
    "sku": "PremiumV3",
    "scmSiteAlsoStopped": false,
    "targetSwapSlot": null,
    "hostingEnvironment": null,
    "hostingEnvironmentProfile": null,
    "clientAffinityEnabled": false,
    "clientCertEnabled": false,
    "clientCertMode": "Required",
    "clientCertExclusionPaths": null,
    "hostNamesDisabled": false,
    "domainVerificationIdentifiers": null,
    "customDomainVerificationId": "YYYYYYYYYYY",
    "kind": "app,linux,container",
    "inboundIpAddress": "YYYYYYYYYYY",
    "possibleInboundIpAddresses": "YYYYYYYYYYY",
    "ftpUsername": "amp-YYYYYYYYYYY\\$amp-YYYYYYYYYYY",
    "ftpsHostName": "ftps://waws-prod-par-019.ftp.azurewebsites.windows.net/site/wwwroot",
    "outboundIpAddresses": "YYYYYYYYYYY",
    "possibleOutboundIpAddresses": "YYYYYYYYYYY",
    "containerSize": 0,
    "dailyMemoryTimeQuota": 0,
    "suspendedTill": null,
    "siteDisabledReason": 0,
    "functionExecutionUnitsCache": null,
    "maxNumberOfWorkers": null,
    "homeStamp": "waws-prod-par-019",
    "cloningInfo": null,
    "hostingEnvironmentId": null,
    "tags": {
    },
    "resourceGroup": "rg-YYYYYYYYYYY",
    "defaultHostName": "amp-YYYYYYYYYYY.azurewebsites.net",
    "slotSwapStatus": null,
    "httpsOnly": true,
    "redundancyMode": "None",
    "inProgressOperationId": null,
    "geoDistributions": null,
    "privateEndpointConnections": [],
    "publicNetworkAccess": null,
    "buildVersion": null,
    "targetBuildVersion": null,
    "migrationState": null,
    "eligibleLogCategories": "AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs,AppServiceFileAuditLogs,AppServiceAntivirusScanAuditLogs",
    "storageAccountRequired": false,
    "virtualNetworkSubnetId": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Network/virtualNetworks/vnet-YYYYYYYYYYY/subnets/snet-YYYYYYYYYYY",
    "keyVaultReferenceIdentity": "SystemAssigned"
  },
  "identity": {
    "type": "SystemAssigned",
    "tenantId": "YYYYYYYYYYY",
    "principalId": "YYYYYYYYYYY"
  }
}


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/web?api-version=2020-06-01

Headers:
x-ms-client-request-id        : a7922815-f5ed-4057-b223-a4e3bb23a64b
Accept-Language               : en-US

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYYYYYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-reads: 11990
x-ms-correlation-request-id   :YYYYYYYYYYY
x-ms-routing-request-id       : FRANCECENTRAL:20220808T074907Z:YYYYYYYYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:06 GMT

Body:
{
  "id": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/web",
  "name": "amp-YYYYYYYYYYY",
  "type": "Microsoft.Web/sites/config",
  "location": "France Central",
  "tags": {
  },
  "properties": {
    "numberOfWorkers": 1,
    "defaultDocuments": [
      "Default.htm",
      "Default.html",
      "Default.asp",
      "index.htm",
      "index.html",
      "iisstart.htm",
      "default.aspx",
      "index.php",
      "hostingstart.html"
    ],
    "netFrameworkVersion": "v4.0",
    "phpVersion": "",
    "pythonVersion": "",
    "nodeVersion": "",
    "powerShellVersion": "",
    "linuxFxVersion": "DOCKER|acrYYYYYYYYYYY.azurecr.io/ap/ap-docker:1.1.0-snapshot",
    "windowsFxVersion": null,
    "requestTracingEnabled": false,
    "remoteDebuggingEnabled": false,
    "remoteDebuggingVersion": "VS2019",
    "httpLoggingEnabled": true,
    "azureMonitorLogCategories": null,
    "acrUseManagedIdentityCreds": false,
    "acrUserManagedIdentityID": null,
    "logsDirectorySizeLimit": 30,
    "detailedErrorLoggingEnabled": false,
    "publishingUsername": "$amp-YYYYYYYYYYY",
    "publishingPassword": null,
    "appSettings": null,
    "metadata": null,
    "connectionStrings": null,
    "machineKey": null,
    "handlerMappings": null,
    "documentRoot": null,
    "scmType": "None",
    "use32BitWorkerProcess": true,
    "webSocketsEnabled": false,
    "alwaysOn": true,
    "javaVersion": null,
    "javaContainer": null,
    "javaContainerVersion": null,
    "appCommandLine": "",
    "managedPipelineMode": "Integrated",
    "virtualApplications": [
      {
        "virtualPath": "/",
        "physicalPath": "site\\wwwroot",
        "preloadEnabled": true,
        "virtualDirectories": null
      }
    ],
    "winAuthAdminState": 0,
    "winAuthTenantState": 0,
    "customAppPoolIdentityAdminState": false,
    "customAppPoolIdentityTenantState": false,
    "runtimeADUser": null,
    "runtimeADUserPassword": null,
    "loadBalancing": "LeastRequests",
    "routingRules": [],
    "experiments": {
      "rampUpRules": []
    },
    "limits": {
      "maxPercentageCpu": 50.0,
      "maxMemoryInMb": 1024,
      "maxDiskSizeInMb": -1
    },
    "autoHealEnabled": true,
    "autoHealRules": {
      "triggers": {
        "requests": null,
        "privateBytesInKB": 0,
        "statusCodes": [],
        "slowRequests": null,
        "slowRequestsWithPath": [],
        "statusCodesRange": []
      },
      "actions": {
        "actionType": "Recycle",
        "customAction": null,
        "minProcessExecutionTime": "00:00:00"
      }
    },
    "tracingOptions": null,
    "vnetName": "YYYYYYYYYYY",
    "vnetRouteAllEnabled": false,
    "vnetPrivatePortsCount": 0,
    "publicNetworkAccess": null,
    "siteAuthEnabled": false,
    "siteAuthSettings": {
      "enabled": null,
      "unauthenticatedClientAction": null,
      "tokenStoreEnabled": null,
      "allowedExternalRedirectUrls": null,
      "defaultProvider": null,
      "clientId": null,
      "clientSecret": null,
      "clientSecretSettingName": null,
      "clientSecretCertificateThumbprint": null,
      "issuer": null,
      "allowedAudiences": null,
      "additionalLoginParams": null,
      "isAadAutoProvisioned": false,
      "aadClaimsAuthorization": null,
      "googleClientId": null,
      "googleClientSecret": null,
      "googleClientSecretSettingName": null,
      "googleOAuthScopes": null,
      "facebookAppId": null,
      "facebookAppSecret": null,
      "facebookAppSecretSettingName": null,
      "facebookOAuthScopes": null,
      "gitHubClientId": null,
      "gitHubClientSecret": null,
      "gitHubClientSecretSettingName": null,
      "gitHubOAuthScopes": null,
      "twitterConsumerKey": null,
      "twitterConsumerSecret": null,
      "twitterConsumerSecretSettingName": null,
      "microsoftAccountClientId": null,
      "microsoftAccountClientSecret": null,
      "microsoftAccountClientSecretSettingName": null,
      "microsoftAccountOAuthScopes": null,
      "configVersion": null
    },
    "cors": null,
    "push": null,
    "apiDefinition": null,
    "apiManagementConfig": null,
    "autoSwapSlotName": null,
    "localMySqlEnabled": false,
    "managedServiceIdentityId": 8110,
    "xManagedServiceIdentityId": null,
    "keyVaultReferenceIdentity": null,
    "ipSecurityRestrictions": [
      {
        "vnetSubnetResourceId": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Network/virtualNetworks/vnet-YYYYYYYYYYY/subnets/snet-YYYYYYYYYYY",
        "action": "Allow",
        "tag": "Default",
        "priority": 100,
        "name": "GWAccess",
        "description": "appgwaccess"
      },
      {
        "vnetSubnetResourceId": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Network/virtualNetworks/vnet-YYYYYYYYYYY/subnets/snet-YYYYYYYYYYY",
        "action": "Allow",
        "tag": "Default",
        "priority": 200,
        "name": "jumpserver",
        "description": "jumpserveraccess"
      },
      {
        "ipAddress": "Any",
        "action": "Deny",
        "priority": 2147483647,
        "name": "Deny all",
        "description": "Deny all access"
      }
    ],
    "scmIpSecurityRestrictions": [
      {
        "ipAddress": "Any",
        "action": "Allow",
        "priority": 1,
        "name": "Allow all",
        "description": "Allow all access"
      }
    ],
    "scmIpSecurityRestrictionsUseMain": false,
    "http20Enabled": false,
    "minTlsVersion": "1.2",
    "minTlsCipherSuite": null,
    "supportedTlsCipherSuites": null,
    "scmMinTlsVersion": "1.2",
    "ftpsState": "Disabled",
    "preWarmedInstanceCount": 0,
    "functionAppScaleLimit": 0,
    "healthCheckPath": "/ap-api/manage/health",
    "fileChangeAuditEnabled": false,
    "functionsRuntimeScaleMonitoringEnabled": false,
    "websiteTimeZone": null,
    "minimumElasticInstanceCount": 0,
    "azureStorageAccounts": {
      "kmp": {
        "type": "AzureBlob",
        "accountName": "YYYYYYYYYYY",
        "shareName": "cf3-YYYYYYYYYYY",
        "accessKey": null,
        "mountPath": "/opt/toto",
        "state": "Ok"
      }
    },
    "http20ProxyFlag": 0,
    "sitePort": null,
    "antivirusScanEnabled": false,
    "storageType": "StorageVolume"
  }
}


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/appsettings/list?api-version=2020-06-01

Headers:
x-ms-client-request-id        : YYYYYYYYYYY
Accept-Language               : en-US

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYYYYYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-resource-requests: 11995
x-ms-correlation-request-id   : YYYYYYYYYYY
x-ms-routing-request-id       : FRANCECENTRAL:20220808T074907Z:YYYYYYYYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:06 GMT

Body:
{
  "id": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/appsettings",
  "name": "appsettings",
  "type": "Microsoft.Web/sites/config",
  "location": "France Central",
  "tags": {
  },
  "properties": {
  
    "WEBSITES_CONTAINER_START_TIME_LIMIT": "",
    "WEBSITES_ENABLE_APP_SERVICE_STORAGE": "false",

    "WEBSITE_HTTPLOGGING_RETENTION_DAYS": "0",
  }
}


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/connectionstrings/list?api-version=2020-06-01

Headers:
x-ms-client-request-id        : YYYYYYYYYYY
Accept-Language               : en-US

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYYYYYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-resource-requests: 11994
x-ms-correlation-request-id   :YYYYYYYYYYY
x-ms-routing-request-id       : FRANCECENTRAL:20220808T074907Z:YYYYYYYYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:06 GMT

Body:
{
  "id": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/connectionstrings",
  "name": "connectionstrings",
  "type": "Microsoft.Web/sites/config",
  "location": "France Central",
  "tags": {
  
  },
  "properties": {}
}


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/YYYYYYYYYYY/resourceGroups/rgYYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/azurestorageaccounts/list?api-version=2020-06-01

Headers:
x-ms-client-request-id        : YYYYYYYYYYY
Accept-Language               : en-US

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYYYYYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-resource-requests: 11993
x-ms-correlation-request-id   : YYYYYYYYYYY
x-ms-routing-request-id       : FRANCECENTRAL:20220808T074907Z:YYYYYYYYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:06 GMT

Body:
{
  "id": "/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/appsettings",
  "name": "azurestorageaccounts",
  "type": "Microsoft.Web/sites/config",
  "location": "France Central",
  "tags": {
  },
  "properties": {
    "kmp": {
      "type": "AzureBlob",
      "accountName": "YYYYYYYYYYY",
      "shareName": "YYYYYYYYYYY-kmp",
      "accessKey": "YYYYYYYYYYY==",
      "mountPath": "/opt/toto",
      "state": "NotValidated"
    }
  }
}


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PATCH

Absolute Uri:
https://management.azure.com/subscriptions/YYYYYYYYYYY/resourceGroups/rg-YYYYYYYYYYY/providers/Microsoft.Web/sites/amp-YYYYYYYYYYY/config/web?api-version=2020-06-01

Headers:
x-ms-client-request-id        : YYYYYYYYYYY
Accept-Language               : en-US

Body:
{
  "properties": {
    "numberOfWorkers": 1,
    "defaultDocuments": [
      "Default.htm",
      "Default.html",
      "Default.asp",
      "index.htm",
      "index.html",
      "iisstart.htm",
      "default.aspx",
      "index.php",
      "hostingstart.html"
    ],
    "netFrameworkVersion": "v4.0",
    "phpVersion": "",
    "pythonVersion": "",
    "nodeVersion": "",
    "linuxFxVersion": "DOCKER|acrYYYYYYYYYYY.azurecr.io/ap/ap-docker:1.1.0-snapshot",
    "requestTracingEnabled": false,
    "remoteDebuggingEnabled": false,
    "remoteDebuggingVersion": "VS2019",
    "httpLoggingEnabled": true,
    "logsDirectorySizeLimit": 30,
    "detailedErrorLoggingEnabled": false,
    "publishingUsername": "$amp-YYYYYYYYYYY",
    "appSettings": [
    
      {
        "name": "WEBSITE_ENABLE_SYNC_UPDATE_SITE",
        "value": "false"
      },
      
      {
        "name": "WEBSITES_CONTAINER_START_TIME_LIMIT",
        "value": ""
      },
      {
        "name": "AP_ARCHIVES_FOLDER",
        "value": "/opt/ap/ap-archives/"
      },
     
    
     
      {
        "name": "WEBSITES_PORT",
        "value": "8080"
      },
  
    
      {
        "name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
        "value": "false"
      },
   
   
      {
        "name": "WEBSITE_HTTPLOGGING_RETENTION_DAYS",
        "value": "0"
      },
     
     
    ],
    "connectionStrings": [],
    "scmType": "None",
    "use32BitWorkerProcess": true,
    "webSocketsEnabled": false,
    "alwaysOn": true,
    "appCommandLine": "",
    "managedPipelineMode": "Integrated",
    "virtualApplications": [
      {
        "virtualPath": "/",
        "physicalPath": "site\\wwwroot",
        "preloadEnabled": true
      }
    ],
    "loadBalancing": "LeastRequests",
    "experiments": {
      "rampUpRules": []
    },
    "limits": {
      "maxPercentageCpu": 50.0,
      "maxMemoryInMb": 1024,
      "maxDiskSizeInMb": -1
    },
    "autoHealEnabled": true,
    "autoHealRules": {
      "triggers": {
        "privateBytesInKB": 0,
        "statusCodes": []
      },
      "actions": {
        "actionType": "Recycle",
        "minProcessExecutionTime": "00:00:00"
      }
    },
    "vnetName": "YYYYY_snet-ampsd-asp",
    "localMySqlEnabled": false,
    "managedServiceIdentityId": 8110,
    "ipSecurityRestrictions": [
      {
        "vnetSubnetResourceId": "/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Network/virtualNetworks/vnet-YYYYY/subnets/snet-YYYYY",
        "action": "Allow",
        "tag": "Default",
        "priority": 100,
        "name": "GWAccess",
        "description": "appgwaccess"
      },
      {
        "vnetSubnetResourceId": "/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Network/virtualNetworks/vnet-YYYYY/subnets/snet-YYYYY",
        "action": "Allow",
        "tag": "Default",
        "priority": 200,
        "name": "jumpserver",
        "description": "jumpserveraccess"
      },
      {
        "ipAddress": "Any",
        "action": "Deny",
        "priority": 2147483647,
        "name": "Deny all",
        "description": "Deny all access"
      }
    ],
    "scmIpSecurityRestrictions": [
      {
        "ipAddress": "Any",
        "action": "Allow",
        "priority": 1,
        "name": "Allow all",
        "description": "Allow all access"
      }
    ],
    "scmIpSecurityRestrictionsUseMain": false,
    "http20Enabled": false,
    "minTlsVersion": "1.2",
    "ftpsState": "Disabled"
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
ETag                          : "1D8AAFB49B4DF95"
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-writes: 1196
x-ms-correlation-request-id   : YYYYY
x-ms-routing-request-id       : FRANCECENTRAL:20220808T074910Z:YYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:09 GMT

Body:
{
  "id": "/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Web/sites/amp-YYYYY",
  "name": "amp-YYYYY",
  "type": "Microsoft.Web/sites",
  "location": "France Central",
  "tags": {
  },
  "properties": {
    "numberOfWorkers": 1,
    "defaultDocuments": [
      "Default.htm",
      "Default.html",
      "Default.asp",
      "index.htm",
      "index.html",
      "iisstart.htm",
      "default.aspx",
      "index.php",
      "hostingstart.html"
    ],
    "netFrameworkVersion": "v4.0",
    "phpVersion": "",
    "pythonVersion": "",
    "nodeVersion": "",
    "powerShellVersion": "",
    "linuxFxVersion": "DOCKER|acrYYYYY.azurecr.io/ap/ap-docker:1.1.0-snapshot",
    "windowsFxVersion": null,
    "requestTracingEnabled": false,
    "remoteDebuggingEnabled": false,
    "remoteDebuggingVersion": "VS2019",
    "httpLoggingEnabled": true,
    "azureMonitorLogCategories": null,
    "acrUseManagedIdentityCreds": false,
    "acrUserManagedIdentityID": null,
    "logsDirectorySizeLimit": 30,
    "detailedErrorLoggingEnabled": false,
    "publishingUsername": "$amp-YYYYY",
    "publishingPassword": null,
    "appSettings": null,
    "metadata": null,
    "connectionStrings": null,
    "machineKey": null,
    "handlerMappings": null,
    "documentRoot": null,
    "scmType": "None",
    "use32BitWorkerProcess": true,
    "webSocketsEnabled": false,
    "alwaysOn": true,
    "javaVersion": null,
    "javaContainer": null,
    "javaContainerVersion": null,
    "appCommandLine": "",
    "managedPipelineMode": "Integrated",
    "virtualApplications": [
      {
        "virtualPath": "/",
        "physicalPath": "site\\wwwroot",
        "preloadEnabled": true,
        "virtualDirectories": null
      }
    ],
    "winAuthAdminState": 0,
    "winAuthTenantState": 0,
    "customAppPoolIdentityAdminState": false,
    "customAppPoolIdentityTenantState": false,
    "runtimeADUser": null,
    "runtimeADUserPassword": null,
    "loadBalancing": "LeastRequests",
    "routingRules": [],
    "experiments": {
      "rampUpRules": []
    },
    "limits": {
      "maxPercentageCpu": 50.0,
      "maxMemoryInMb": 1024,
      "maxDiskSizeInMb": -1
    },
    "autoHealEnabled": true,
    "autoHealRules": {
      "triggers": {
        "requests": null,
        "privateBytesInKB": 0,
        "statusCodes": [],
        "slowRequests": null,
        "slowRequestsWithPath": [],
        "statusCodesRange": []
      },
      "actions": {
        "actionType": "Recycle",
        "customAction": null,
        "minProcessExecutionTime": "00:00:00"
      }
    },
    "tracingOptions": null,
    "vnetName": "YYYYY_snet-ampsd-asp",
    "vnetRouteAllEnabled": false,
    "vnetPrivatePortsCount": 0,
    "publicNetworkAccess": null,
    "siteAuthEnabled": false,
    "siteAuthSettings": {
      "enabled": null,
      "unauthenticatedClientAction": null,
      "tokenStoreEnabled": null,
      "allowedExternalRedirectUrls": null,
      "defaultProvider": null,
      "clientId": null,
      "clientSecret": null,
      "clientSecretSettingName": null,
      "clientSecretCertificateThumbprint": null,
      "issuer": null,
      "allowedAudiences": null,
      "additionalLoginParams": null,
      "isAadAutoProvisioned": false,
      "aadClaimsAuthorization": null,
      "googleClientId": null,
      "googleClientSecret": null,
      "googleClientSecretSettingName": null,
      "googleOAuthScopes": null,
      "facebookAppId": null,
      "facebookAppSecret": null,
      "facebookAppSecretSettingName": null,
      "facebookOAuthScopes": null,
      "gitHubClientId": null,
      "gitHubClientSecret": null,
      "gitHubClientSecretSettingName": null,
      "gitHubOAuthScopes": null,
      "twitterConsumerKey": null,
      "twitterConsumerSecret": null,
      "twitterConsumerSecretSettingName": null,
      "microsoftAccountClientId": null,
      "microsoftAccountClientSecret": null,
      "microsoftAccountClientSecretSettingName": null,
      "microsoftAccountOAuthScopes": null,
      "configVersion": null
    },
    "cors": null,
    "push": null,
    "apiDefinition": null,
    "apiManagementConfig": null,
    "autoSwapSlotName": null,
    "localMySqlEnabled": false,
    "managedServiceIdentityId": 8110,
    "xManagedServiceIdentityId": null,
    "keyVaultReferenceIdentity": null,
    "ipSecurityRestrictions": [
      {
        "vnetSubnetResourceId": "/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Network/virtualNetworks/vnet-YYYYY/subnets/snet-YYYYY",
        "action": "Allow",
        "tag": "Default",
        "priority": 100,
        "name": "GWAccess",
        "description": "appgwaccess"
      },
      {
        "vnetSubnetResourceId": "/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Network/virtualNetworks/vnet-YYYYY/subnets/snet-YYYYY",
        "action": "Allow",
        "tag": "Default",
        "priority": 200,
        "name": "jumpserver",
        "description": "jumpserveraccess"
      },
      {
        "ipAddress": "Any",
        "action": "Deny",
        "priority": 2147483647,
        "name": "Deny all",
        "description": "Deny all access"
      }
    ],
    "scmIpSecurityRestrictions": [
      {
        "ipAddress": "Any",
        "action": "Allow",
        "priority": 1,
        "name": "Allow all",
        "description": "Allow all access"
      }
    ],
    "scmIpSecurityRestrictionsUseMain": false,
    "http20Enabled": false,
    "minTlsVersion": "1.2",
    "minTlsCipherSuite": null,
    "supportedTlsCipherSuites": null,
    "scmMinTlsVersion": "1.2",
    "ftpsState": "Disabled",
    "preWarmedInstanceCount": 0,
    "functionAppScaleLimit": 0,
    "healthCheckPath": "/ap-api/manage/health",
    "fileChangeAuditEnabled": false,
    "functionsRuntimeScaleMonitoringEnabled": false,
    "websiteTimeZone": null,
    "minimumElasticInstanceCount": 0,
    "azureStorageAccounts": {
      "kmp": {
        "type": "AzureBlob",
        "accountName": "stYYYYY",
        "shareName": "cf3-YYYYY",
        "accessKey": null,
        "mountPath": "/opt/toto",
        "state": "Ok"
      }
    },
    "http20ProxyFlag": 0,
    "sitePort": null,
    "antivirusScanEnabled": false,
    "storageType": "StorageVolume"
  }
}


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Web/sites/amp-YYYYY/config/appsettings?api-version=2020-06-01

Headers:
x-ms-client-request-id        : YYYYY
Accept-Language               : en-US

Body:
{
  "properties": {
    "WEBSITES_CONTAINER_START_TIME_LIMIT": "",
    "WEBSITES_ENABLE_APP_SERVICE_STORAGE": "false",
    "WEBSITE_HTTPLOGGING_RETENTION_DAYS": "0",
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
ETag                          : "YYYYY"
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-writes: 1195
x-ms-correlation-request-id   : YYYYY
x-ms-routing-request-id       : FRANCECENTRAL:20220808T074911Z:YYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:10 GMT

Body:
{
  "id": "/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Web/sites/amp-sYYYYY/config/appsettings",
  "name": "appsettings",
  "type": "Microsoft.Web/sites/config",
  "location": "France Central",
  "tags": {
 
  },
  "properties": {
 
    "WEBSITE_ENABLE_SYNC_UPDATE_SITE": "false",
    "WEBSITES_CONTAINER_START_TIME_LIMIT": "",
    "WEBSITE_HTTPLOGGING_RETENTION_DAYS": "0"
  }
}


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Web/sites/amp-YYYYY/config/azurestorageaccounts?api-version=2020-06-01

Headers:
x-ms-client-request-id        : YYYYY
Accept-Language               : en-US

Body:
{
  "properties": {
    "kmp": {
      "type": "AzureBlob",
      "accountName": "stYYYYY",
      "shareName": "cf3-YYYYY",
      "accessKey": "YYYYY==",
      "mountPath": "/opt/toto"
    }
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
ETag                          : "1D8AAFB5924E655"
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : YYYYY
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-writes: 1194
x-ms-correlation-request-id   : YYYYY
x-ms-routing-request-id       : FRANCECENTRAL:20220808T074912Z:YYYYY
X-Content-Type-Options        : nosniff
Date                          : Mon, 08 Aug 2022 07:49:11 GMT

Body:
{
  "id": "/subscriptions/YYYYY/resourceGroups/rg-YYYYY/providers/Microsoft.Web/sites/amp-YYYYY/config/azurestorageaccounts",
  "name": "azurestorageaccounts",
  "type": "Microsoft.Web/sites/config",
  "location": "France Central",
  "tags": {
  },
  "properties": {
    "kmp": {
      "type": "AzureBlob",
      "accountName": "stYYYYY",
      "shareName": "cf3-YYYYY-kmp",
      "accessKey": "YYYYY==",
      "mountPath": "/opt/toto",
      "state": "NotValidated"
    }
  }
}


Set-AzWebApp: Unable to deserialize the response.
DEBUG: AzureQoSEvent: Module: Az.Websites:2.8.3; CommandName: Set-AzWebApp; PSVersion: 7.2.5; IsSuccess: False; Duration: 00:00:05.6479140; Exception: Unable to deserialize the response.;
DEBUG: Finish sending metric.
DEBUG: 9:49:12 AM - SetAzureWebAppCmdlet end processing.

Environment data

PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.5
PSEdition                      Core
GitCommitId                    7.2.5
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

PS > Get-Module Az*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.6.2                 Az.Accounts                         {Add-AzEnvironment, Clear-AzContext, Clear-AzDefa…
Script     3.12.0                Az.Storage                          {Add-AzRmStorageContainerLegalHold, Add-AzStorage…
Script     2.8.3                 Az.Websites                         {Add-AzWebAppAccessRestrictionRule, Add-AzWebAppT…

Error output

DEBUG: 12:10:58 PM - ResolveError begin processing with ParameterSet 'LastErrorParameterSet'.
DEBUG: 12:10:58 PM - using account id 'XXXXX'...
WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release.  Please change any scripts that use this alias to use `Resolve-AzError` instead.
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.

   HistoryId: 38

Message        : Unable to deserialize the response.
StackTrace     :    at Microsoft.Azure.Management.WebSites.WebAppsOperations.UpdateAzureStorageAccountsWithHttpMessages
                 Async(String resourceGroupName, String name, AzureStoragePropertyDictionaryResource
                 azureStorageAccounts, Dictionary`2 customHeaders, CancellationToken cancellationToken)
                    at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.UpdateAzureStorageAccountsAsync(
                 IWebAppsOperations operations, String resourceGroupName, String name,
                 AzureStoragePropertyDictionaryResource azureStorageAccounts, CancellationToken cancellationToken)
                    at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.UpdateAzureStorageAccounts(IWebA
                 ppsOperations operations, String resourceGroupName, String name,
                 AzureStoragePropertyDictionaryResource azureStorageAccounts)
                    at Microsoft.Azure.Commands.WebApps.Utilities.WebsitesClient.UpdateWebAppConfiguration(String
                 resourceGroupName, String location, String webSiteName, String slotName, SiteConfig siteConfig,
                 IDictionary`2 appSettings, IDictionary`2 connectionStrings, AzureStoragePropertyDictionaryResource
                 azureStorageSettings)
                    at Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.SetAzureWebAppCmdlet.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronously
                 OrAsJob>b__3_0(T c)
                    at
                 Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T
                 cmdlet, Action`1 executor)
                    at
                 Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T
                 cmdlet)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : Microsoft.Rest.SerializationException
InvocationInfo : {Set-AzWebApp}
Line           : Set-AzWebApp `

Position       : At line:1 char:1
                 + Set-AzWebApp `
                 + ~~~~~~~~~~~~~~
HistoryId      : 38

Message        : Error converting value "NotValidated" to type
                 'System.Nullable`1[Microsoft.Azure.Management.WebSites.Models.AzureStorageState]'. Path
                 'properties.kmp.state', line 1, position 846.
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.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.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.UpdateAzureStorageAccountsWithHttpMessages
                 Async(String resourceGroupName, String name, AzureStoragePropertyDictionaryResource
                 azureStorageAccounts, Dictionary`2 customHeaders, CancellationToken cancellationToken)
Exception      : Newtonsoft.Json.JsonSerializationException
InvocationInfo : {Set-AzWebApp}
Line           : Set-AzWebApp `

Position       : At line:1 char:1
                 + Set-AzWebApp `
                 + ~~~~~~~~~~~~~~
HistoryId      : 38

Message        : Requested value 'NotValidated' 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 : {Set-AzWebApp}
Line           : Set-AzWebApp `

Position       : At line:1 char:1
                 + Set-AzWebApp `
                 + ~~~~~~~~~~~~~~
HistoryId      : 38


The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.

DEBUG: AzureQoSEvent: Module: Az.Accounts:2.6.2; CommandName: Resolve-AzError; PSVersion: 7.2.5; IsSuccess: True; Duration: 00:00:00.0870653

pmarguerite-kayentis avatar Aug 08 '22 10:08 pmarguerite-kayentis

Thank you for your feedback. This has been routed to the support team for assistance.

msftbot[bot] avatar Aug 08 '22 10:08 msftbot[bot]

@pmarguerite-kayentis Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.

navba-MSFT avatar Aug 10 '22 01:08 navba-MSFT

@pmarguerite-kayentis Could you please follow the below action plan and let me know if that helps ?

Plan 1: Please try to update your Az.Websites module to the most recent version.

Plan 2: Could you please confirm if you ran the New-AzWebAppAzureStoragePath PS cmdlet to get the value for AzureStoragePath $webAppStoragePathObject parameter ?

Plan 3: Alternatively, please try to run the below PS Script and check if that helps:

$auth=Get-AzAccessToken   # This command will get the bearer token which will be sent in the Auth header
$authHeader= $auth.token 

# Link the Azure Storage with Webapp. Modify the Subscription ID and Resource Group and Resource name in the below command
$output= Invoke-WebRequest -UseBasicParsing https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts?api-version=2022-03-01 -Method PUT -Headers @{"Authorization"="Bearer $authHeader"} -Body "'properties':{'kmp':{'type':'AzureBlob','accountName':'stYYYYY','shareName':'cf3-YYYYY-kmp','accessKey':'YYYYY==','mountPath':'/opt/toto','state": 'NotValidated'}}"

Awaiting your reply.

navba-MSFT avatar Aug 10 '22 10:08 navba-MSFT

Thanks ,

Plan 1: It does work; Thanks

Plan 2: Yes, I run New-AzWebAppAzureStoragePath PS cmdlet to get the value for AzureStoragePath

So, probably, a bug in a previous version of the AZ.Websites module

pmarguerite-kayentis avatar Aug 10 '22 15:08 pmarguerite-kayentis