Get Function Token CLI

 Notice the name of the token which is created as App keys in the function.

function GetFunctionToken {
    param (

    # Get function token
    $url = "/subscriptions/$subscriptionId/resourceGroups/$funcResGroupName/providers/Microsoft.Web/sites/$funcName/host/default/listKeys?api-version=2018-11-01"

    $functionCode = az rest --method post --uri $url --query functionKeys.appkeyName --output tsv
    return $functionCode

Author: Pouya Panahy

Microsoft certified DevOps engineer with passion in analysing, designing and implementing solutions for Azure Cloud with hands-on experience in security and quality assurence.

Leave a Reply