title: How to retrieve an Azure Function App's default host key from an ARM template?
body: <p>I am able to retrieve an Azure Function App's default host key using the <a href="https://github.com/Azure/azure-functions-host/wiki/Key-management-API#host-keys-collection-resource-adminhostkeys" rel="nofollow noreferrer">/admin/host/keys REST API</a> from Postman.</p>
  
  <p>I obtain a token from Kudu using the deployment credentials and Basic authentication against <code>https://{{Function-App-Kudu-Url}}/api/functions/admin/token</code>. Then I include the returned token using Bearer authentication against <code>https://{{Function-App-Url}}/admin/host/keys/default</code> and receive the default host key.</p>
  
  <p>However, I would like to retrieve this value from within an ARM JSON template. Googling has not proved fruitful in uncovering how this might be done.</p>
  
  <p>It seems that maybe the <code>listkeys</code> or <code>listsecrets</code> function might work, but any parameters I provide to them do not return the key.</p>
  
  <p>How can the default host key be accessed from within an ARM JSON template?</p>