microsoftarchive / Learn-LTI

Access the Microsoft Learn http://docs.microsoft.com/learn Catalog of Learning Paths and Modules directly from your Learning Management Systems using the Microsoft Learn LTI application
https://microsoft.github.io/Learn-LTI/
MIT License
126 stars 50 forks source link

cannot access the application 'd41fd017-4c7d-4867-ac93-3cac32d3f7a9' #234

Closed MathieuHoude closed 1 year ago

MathieuHoude commented 1 year ago

Describe the issue In the deployment guide, when I access the tool registration page, I get the following error: Selected user account does not exist in tenant 'Microsoft' and cannot access the application 'd41fd017-4c7d-4867-ac93-3cac32d3f7a9' in that tenant. The account needs to be added as an external user in the tenant first. Please use a different account. Capture d’écran 2023-02-21 224717 The deployment script runs without any error. The account used is the owner of the subscription to which the tool was deployed.

Expected behavior To be able to finish the deployment process by accessing the tool registration page.

MathieuHoude commented 1 year ago

If it can help somebody else, after many, many debugging hours I finally found out the issue.

Using: dotnetcore 3.1 azure-cli 2.27 nodejs 18.14.2 The important part: Powershell 7 (the script was not working with Powershell 5)

Also, with the script as is, I was getting the following error

ParentResourceNotFound {
"status": "Failed",
"error": {
"code": "BadRequest",
"message": "Invalid value found at accessPolicies[0].ObjectId: "
}
}

The source of this issue is in the Deploy.ps1 file: $userObjectId = az ad signed-in-user show --query id should be $userObjectId = az ad signed-in-user show --query objectId

Even though I use the exact version mentioned in the deployment guide, I guess that something changed in the azure cli.

leestott commented 1 year ago

Thanks for the confirmation. We will add this to the troubleshooting guide.