Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

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

Closed
sqo365 opened this issue Oct 24, 2022 · 4 comments
Closed

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

sqo365 opened this issue Oct 24, 2022 · 4 comments

Comments

@sqo365
Copy link

sqo365 commented Oct 24, 2022

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
Copy link

ViktorKopychko commented Oct 25, 2022

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
Copy link
Author

sqo365 commented Oct 30, 2022

Dear Viktor

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

Much appreciated

@sqo365 sqo365 closed this as completed Oct 30, 2022
leestott added a commit that referenced this issue Nov 1, 2022
So the objectId was replaced by id.
Depreicated Graph update script $userObjectId = az ad signed-in-user show --query objectId to $userObjectId = az ad signed-in-user show --query id  as per #215
@leestott
Copy link
Contributor

leestott commented Nov 1, 2022

Thanks deployment script has been updated to reflect this change.

@Chuckles123456
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants