PlagueHO / CosmosDB

PowerShell Module for working with Azure Cosmos DB databases, collections, documents, attachments, offers, users, permissions, triggers, stored procedures and user defined functions.
http://dscottraynsford.com
MIT License
152 stars 46 forks source link

BREAKING CHANGE: Add Support for RBAC using Entra ID Token via New-CosmosDbContext - Fixes #479 #483

Closed PlagueHO closed 2 months ago

PlagueHO commented 2 months ago

Pull Request

This PR adds support for RBAC using Entra ID tokens. It updates the New-CosmosDbContext function with two new parameters and parameter sets.

It also adds the Get-CosmosDbEntraIdToken function which is a utility function for generating the Access token (wrapping Get-AzAccessToken)

Also fixes #482

This PR also importantly updates the dependency on the PowerShell modules Az.Accounts to v2.19.0 and Az.Resources v6.16.2 to the latest version which is why I've triggered it as a breaking change. This was not strictly necessary, but due to updating the sampler builder code it required the same version to be used. If something thinks this is a major issue I can roll it back, but felt it is better to take dependency on recent versions.

Bug Fixes

Added


This change is Reviewable