diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d38df254..6e834d640 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `Get-PnPDeletedContainer` cmdlet which returns a list of all deleted Containers in the recycle bin. [#3648](https://github.com/pnp/powershell/pull/3648) - Added `Get-PnPContainerTypeConfiguration` cmdlet which fetches the container type configuration values. [#3660](https://github.com/pnp/powershell/pull/3660) +### Fixed + +- Fixed `Grant-PnPAzureADAppSitePermission` cmdlet which allows it to work in multi-geo environment. + ### Contributors - Koen Zomers [koenzomers] diff --git a/src/Commands/Apps/GrantAzureADAppSitePermission.cs b/src/Commands/Apps/GrantAzureADAppSitePermission.cs index f9bfe350a..2372a84e7 100644 --- a/src/Commands/Apps/GrantAzureADAppSitePermission.cs +++ b/src/Commands/Apps/GrantAzureADAppSitePermission.cs @@ -54,6 +54,10 @@ protected override void ExecuteCmdlet() return; } + // Adding a fix for multi-geo issue + // https://github.com/pnp/powershell/issues/2801 + var multiGeoFix = Utilities.REST.RestHelper.GetAsync(Connection.HttpClient, $"https://{Connection.GraphEndPoint}/v1.0/sites/{siteId}", AccessToken).GetAwaiter().GetResult(); + // Construct the payload of the Graph request var payload = new {