Entry point was not found.
Could not find tenant id for provided tenant domain 'X'. Please ensure that the provided service principal 'X' is found in the provided tenant domain.
at <ScriptBlock>, C:\ProgramData\UniversalAutomation\Repository\Keyvault.ps1: line 7
at <ScriptBlock>, <No file>: line 1
When i try to connect to a Subscription via Connect-AzAccount i get the Error above. In this case i tried to setup Azure KeyVault for Secrets. I use the latest Version of Az.Account 5.3.0. On the Host directly the script is working with PS5 and 7. We use a Managed Service Account for running the PSU Service.
Connect-MgGraph, with the same settings, works without a problem
I have seen in the Docs that you should move it to another process so that it works, but we also want to manage other Things in azure. Will we need to outsource it everytime we want to use it?
And when i set it up like in the docs, no secret gets created in the Vault. When i try to set a secret manually via a script with Set-secret i get the same error again:
Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials.
Entry point was not found.
But with Get-azContext and Get-secretVault the vault is shown as expected
I also have the same issue but I use the Connect-AzAccount with the -Identity.
Almost always after my powershell universal dashboard starts, it cannot connect to the AZ account, I need to restart the app.
My keyvault connection also throws errors, I have to reload the app and it works again.
So I created a sort of startup script that tries connect-azaccount and the keyvault a few times after container start.
This all might have something to do with the Az.KeyVault module, runspaces, disable context autosave.