title: Azure Resource Manager: Web App Slots Config: App Service Authentication
body: <p>I am having a issue with applying a App Service Authentication to my Web App Slots.</p>
  <p>The error i am receiving is the following:</p>
  <p><strong>&quot;The template resource 'webapptest1a/authconfig' for type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Common.Entities.TemplateGenericProperty`1[System.String]' at line '1' and column '8107' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name&quot;</strong></p>
  <p>Here is my code, which i think is pretty much correct. I am finding it difficult to find references for Web App slots config. I have the Microsoft Documentation and i followed it, but no luck.</p>
  <p>Here is my code:</p>
  <pre><code>{
          &quot;type&quot;: &quot;Microsoft.Web/sites/slots/config&quot;,
          &quot;name&quot;: &quot;[concat(parameters('webAppName'),'/authconfig')]&quot;,
          &quot;apiVersion&quot;: &quot;2018-11-01&quot;,
          &quot;location&quot;: &quot;[resourceGroup().location]&quot;,
          &quot;dependsOn&quot;: [
              &quot;[parameters('webAppName')]&quot;,
              &quot;[concat(parameters('sqlDatabase'), 'constr')]&quot;
          ],
           &quot;properties&quot;: {
              &quot;enabled&quot;: true,
              &quot;runtimeVersion&quot;: &quot;~1&quot;,
              &quot;unauthenticatedClientAction&quot;: &quot;RedirectToLoginPage&quot;,
              &quot;tokenStoreEnabled&quot;: true,
              &quot;allowedExternalRedirectUrls&quot;: null,
              &quot;defaultProvider&quot;: &quot;AzureActiveDirectory&quot;,
              &quot;clientId&quot;: null,
              &quot;clientSecret&quot;: null,
              &quot;clientSecretCertificateThumbprint&quot;: null,
              &quot;issuer&quot;: null,
              &quot;allowedAudiences&quot;: [
                  &quot;https://webapptest1a-staging.azurewebsites.net&quot;
              ],
              &quot;additionalLoginParams&quot;: null,
              &quot;isAadAutoProvisioned&quot;: false,
              &quot;googleClientId&quot;: null,
              &quot;googleClientSecret&quot;: null,
              &quot;googleOAuthScopes&quot;: null,
              &quot;facebookAppId&quot;: null,
              &quot;facebookAppSecret&quot;: null,
              &quot;facebookOAuthScopes&quot;: [
              &quot;&quot;
              ],
              &quot;twitterConsumerKey&quot;: null,
              &quot;twitterConsumerSecret&quot;: null,
              &quot;microsoftAccountClientId&quot;: null,
              &quot;microsoftAccountClientSecret&quot;: null,
              &quot;microsoftAccountOAuthScopes&quot;: [
              &quot;&quot;
              ]
              }
          },
  </code></pre>
  <p>I am really concussed, i have tried many variants but i am not getting close.</p>
  <p>I changed the name to few different variants then i was given different errors but in regards to the naming convention.</p>
  <pre><code>&quot;name&quot;: &quot;[concat(parameters('webAppName'), '/appsettings')]&quot;,
  </code></pre>
  <p><strong>I also changed the Depends on twice from:</strong></p>
  <pre><code>&quot;[parameters('webAppName')]&quot;,
                  &quot;[concat(parameters('sqlDatabase'), 'constr')]&quot;
  </code></pre>
  <p><strong>To:</strong></p>
  <pre><code>&quot;[concat('Microsoft.Web/sites/', parameters('webAppName'))]&quot;,
              &quot;[concat(parameters('sqlDatabase'), 'constr')]&quot;
  </code></pre>
  <p>I am really stuck! Would love some guidance.</p>
  <p>Thank you</p>