Convert Powershell Script To Azure Function Authentication