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

Handle Error from Get-AzOpsCurrentPrincipal #857

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

Jefajers
Copy link
Member

@Jefajers Jefajers commented Feb 5, 2024

Overview/Summary

This PR bumps dependencies and adds logic to handle errors from Get-AzOpsCurrentPrincipal when performing Invoke-AzRestMethod or Get-AzADServicePrincipal.

This is to better align with previous Az.Resources default behavior and avoid unintentional errors thrown when principal id cannot be resolved.

Bumping dependencies.

  • Az.Accounts 2.15.1
  • Az.Resources 6.15.0

This PR fixes/adds/changes/removes

  1. Changes Initialize-AzOpsEnvironment.ps1
  2. Changes Get-AzOpsCurrentPrincipal.ps1

Breaking Changes

N/A

Testing Evidence

Manual tests for user, managed identity and default logic like with tokens have been performed.

As part of this Pull Request I have

  • Checked for duplicate Pull Requests
  • Associated it with relevant issues, for tracking and closure.
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Performed testing and provided evidence.
  • Updated relevant and associated documentation.

@Jefajers Jefajers changed the title Silence Error from Get-AzOpsCurrentPrincipal Handle Error from Get-AzOpsCurrentPrincipal Feb 7, 2024
Copy link
Contributor

@daltondhcp daltondhcp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌭 ✅

@Jefajers Jefajers merged commit c7a824e into Azure:main Feb 7, 2024
2 of 3 checks passed
@Jefajers Jefajers deleted the missingPrincipalId branch February 7, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants