Azure / AzOps

AzOps is a PowerShell module which deploys (Push) ARM Resource Templates & Bicep files at all Azure scope levels and exports (Pull) ARM resource hierarchy.
https://aka.ms/AzOps
MIT License
371 stars 158 forks source link

Handle Error from Get-AzOpsCurrentPrincipal #857

Closed Jefajers closed 5 months ago

Jefajers commented 5 months ago

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.

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