Johannes Schweer
Johannes Schweer

Reputation: 229

How to get azure function app Credentials?

Every Azure Function has a publish profile containing a username and a password. I need them because I want to create a FunctionApp with Powershell and push a function with zip Deployment immediately.

The Question is:

How can I get these two parameters from a Function, using PowerShell?

Upvotes: 1

Views: 1627

Answers (1)

Jerry Liu
Jerry Liu

Reputation: 17790

Just use the code below, it works on my side.

$credentials = Invoke-AzureRmResourceAction -ResourceGroupName YourResourceGroup -ResourceType Microsoft.Web/sites/config -ResourceName YourWebApp/publishingcredentials -Action list -ApiVersion 2015-08-01 -Force
$username = $credentials.Properties.PublishingUserName
$password = $credentials.Properties.PublishingPassword 

Upvotes: 1

Related Questions