Skip to content

Conversation

HarryGwinnell
Copy link

@HarryGwinnell HarryGwinnell commented Sep 1, 2025

The PowerShell cmdlet is called Invoke-RestMethod, not Invoke-RestMeth as mentioned in this doc. Fix the cmdlet name so future folks who try to run these commands don't run into issues.

The command also includes a Variable reference $Resource, but uses single quotes for the string so the variable isn't being substituted. Switch to double quotes so the strings behave as expected.

image Screenshot above shows the original command failing on the first line. Second line shows the command failing again, this time with an error ' The resource principal named $resource was not found'. The third line shows the command running successfully with no output, and the fourth line shows the successful token acquisition.

After this step, we're instructed to do $content = $response.Content | ConvertFrom-Json to convert the result, but attempting to do so throws an error. The following step can fetch the access token without needing to manipulate the response, so bypass this step.
image

Copy link
Contributor

@HarryGwinnell : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit 44afbec:

✅ Validation status: passed

File Status Preview URL Details
docs/identity/managed-identities-azure-resources/how-to-use-vm-token.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

Learn Build status updates of commit fe924a4:

✅ Validation status: passed

File Status Preview URL Details
docs/identity/managed-identities-azure-resources/how-to-use-vm-token.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

Learn Build status updates of commit 2255aa2:

✅ Validation status: passed

File Status Preview URL Details
docs/identity/managed-identities-azure-resources/how-to-use-vm-token.md ✅Succeeded

For more details, please refer to the build report.

@v-regandowner
Copy link
Contributor

@SHERMANOUKO - Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

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

Successfully merging this pull request may close these issues.

3 participants