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

Error while creating Resources in Azure (step 6) #215

Closed sqo365 closed 1 year ago

sqo365 commented 1 year ago

Dear Support

Im facing this issue while creating Resources in Azure , please take alook

error

============================================================= STEP #6 - Creating Resources in Azure

WARNING: This command or command group has been migrated to Microsoft Graph API. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-graph-migration ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Invalid value found at accessPolicies[0].ObjectId: \"\r\n }\r\n}"}]}} Transcript stopped, output file is C:\Learn-Lti\Learn-LTI\deployment\Log\Transcript-24-10-2022-17-26-11.log Press any Key to Exit: d

ViktorKopychko commented 1 year ago

Hi @sqo365, I believe I've found the reason for this.

At https://learn.microsoft.com/nb-no/cli/azure/microsoft-graph-migration you can see the following line:

For example, the most outstanding change is that the objectId property in the output JSON of a Graph object is replaced by id.

So the objectId was replaced by id. You can change $userObjectId = az ad signed-in-user show --query objectId to $userObjectId = az ad signed-in-user show --query id in Deploy.ps1 file and it will work (at least it worked for me)

sqo365 commented 1 year ago

Dear Viktor

Thank you for your contribution, the issue is now resolved you are a hero!

Much appreciated

leestott commented 1 year ago

Thanks deployment script has been updated to reflect this change.

Chuckles123456 commented 1 year ago

I just got the same error and had to revert it back to "$userObjectId = az ad signed-in-user show --query objectId" to get my keyvault to move to step 7