Skip to content

Commit

Permalink
Fix for gov cloud (#1944)
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamdsheth authored Jun 8, 2022
1 parent 8bf4eaa commit 245dc2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Commands/Base/PnPSharePointCmdlet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public string GraphAccessToken
{
if (Connection?.ConnectionMethod == ConnectionMethod.ManagedIdentity)
{
return TokenHandler.GetManagedIdentityTokenAsync(this, HttpClient, $"https://graph.microsoft.com/").GetAwaiter().GetResult();
return TokenHandler.GetManagedIdentityTokenAsync(this, HttpClient, $"https://{Connection.GraphEndPoint}/").GetAwaiter().GetResult();
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Utilities/TeamsUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ public static async Task<TeamChannelMember> AddChannelMemberAsync(HttpClient htt
{
var channelMember = new TeamChannelMember
{
UserIdentifier = $"https://graph.microsoft.com/v1.0/users('{upn}')",
UserIdentifier = $"https://{PnPConnection.Current.GraphEndPoint}/v1.0/users('{upn}')",
};

// The role for the user. Must be owner or empty.
Expand Down

0 comments on commit 245dc2c

Please sign in to comment.