Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly. #25492

Open
apb-aursel opened this issue Jul 9, 2024 · 0 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported

Comments

@apb-aursel
Copy link

Description

Getting error: ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.

Issue script & Debug output

Param( [string]$appName )

if (!$appName)
{
    Write-Host "appName is null"
    exit 1
}

"Creating AAD app $appName..."
$app = az ad app create --display-name $appName  --sign-in-audience AzureADMyOrg --required-resource-accesses manifest.json | ConvertFrom-Json

# wait for the AAD app to be created or the script will fail later on
"Waiting for the app to be fully provisioned..."
Start-Sleep -Seconds 10
Write-Host $app
Write-Host $LASTEXITCODE

exit 2
# add current user as app owner Set-AzureADApplication -ObjectId "5e33af72-0926-4211-a9d2-ecd197fd7a60" -PublisherDomain "portdebarcelona.cat"
# az ad app update --id 5e33af72-0926-4211-a9d2-ecd197fd7a60 --set publisherDomain=portdebarcelona.cat
# Property 'publisherDomain' is read-only and cannot be set.
"Adding current user as app owner..."
$userId = az ad signed-in-user show --query id -o tsv
az ad app owner add --id $app.appId --owner-object-id $userId

$appSecret = az ad app credential reset --id $app.appId --display-name "ForWebApp" --years 2 | ConvertFrom-Json

""
"AppId=$($app.appId)"
"AppPassword=$($appSecret.password)"

az ad sp create --id $app.appId

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.3
PSEdition                      Core
GitCommitId                    7.4.3
OS                             CBL-Mariner/Linux
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     3.0.0                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzConte…
Script     8.0.0                 Az.Compute                          {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAddition…
Script     7.6.0                 Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificat…
Script     7.1.0                 Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, G…
Script     7.0.0                 Az.Storage                          {Add-AzRmStorageContainerLegalHold, Add-AzStorage…
Script     1.1.3                 Az.Tools.Predictor                  {Disable-AzPredictor, Enable-AzPredictor, Open-Az…
Script     0.0.0.10              AzureAD.Standard.Preview            {Add-AzureADApplicationOwner, Add-AzureADDeviceRe…
Script     0.9.3                 AzurePSDrive

Error output

ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
@apb-aursel apb-aursel added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jul 9, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jul 9, 2024
@isra-fel isra-fel removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported
Projects
None yet
Development

No branches or pull requests

3 participants