Variables aren't reachable when defined in dashboard.ps1

I have been working with UD for quite some time now, but I’ve just now gotten to the point of actually deploying a dashboard to an Azure App Service. After working out some kinks, everything seemed to be fine. That is until I wanted to pull some info from Azure before the dashboard started. I ultimately need to pull a few keys out of Az Key Vault (so they are obscured from the code), and store them in variables for later use. However, I can’t get any of these variables to pass into the scope of the endpoints on my page.

I have tried including the variables via New-UDEndpointInitialization and making them Cache: scoped variables, but no matter what, I can’t reach them on my page.

I have another local dashboard where I initialize variables using Cache: with no issue. Has anyone else had this issue when deploying to Azure?

Did you write them as the string without $?
like

$includeMe = ‘First to include’
$alsoMe = ‘I am also a variable that need to go to endpoints’
New-UDEndpointInitialization -Variable includeMe,alsoMe

This was an entirely self inflicted error on my part. I was attempting to call Connect-AzAccount before I had actually imported the Az module. I wasn’t able to see the error, since it was happening while the dashboard was initializing. I had to wrap it in a try/catch and output the error to a log file to see it, at which point I said aloud: “Doh!”