Skip to content

hotfix for Azure Active Directory Admin set #16806

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

Merged
merged 2 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Sql/Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Upcoming Release
* Hotfix for Azure Active Directory Admin
- AzureSqlServerActiveDirectoryAdministratorAdapter and AzureSqlInstanceActiveDirectoryAdministratorAdapter both used AzureEnvironment.Endpoint.AzureEnvironment.Endpoint.Graph instead of AzureEnvironment.ExtendedEndpoint.MicrosoftGraphUrl

## Version 3.7.0
* Added `ZoneRedundant` parameter to `New-AzSqlDatabaseCopy`, `New-AzSqlDatabaseSecondary` and `Restore-AzSqlDatabase` to enable zone redundant copy, geo secondary and PITR support for hyperscale databases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public MicrosoftGraphClient MicrosoftGraphClient
{
if (_microsoftGraphClient == null)
{
_microsoftGraphClient = AzureSession.Instance.ClientFactory.CreateArmClient<MicrosoftGraphClient>(Context, AzureEnvironment.Endpoint.Graph);
_microsoftGraphClient = AzureSession.Instance.ClientFactory.CreateArmClient<MicrosoftGraphClient>(Context, AzureEnvironment.ExtendedEndpoint.MicrosoftGraphUrl);
_microsoftGraphClient.TenantID = Context.Tenant.Id;
}
return _microsoftGraphClient;
Expand Down Expand Up @@ -315,7 +315,7 @@ protected Guid GetTenantId()
{
var tenantIdStr = Context.Tenant.Id.ToString();
string adTenant = Context.Environment.GetEndpoint(AzureEnvironment.Endpoint.AdTenant);
string graph = Context.Environment.GetEndpoint(AzureEnvironment.Endpoint.Graph);
string graph = Context.Environment.GetEndpoint(AzureEnvironment.ExtendedEndpoint.MicrosoftGraphUrl);
var tenantIdGuid = Guid.Empty;

if (string.IsNullOrWhiteSpace(tenantIdStr) || !Guid.TryParse(tenantIdStr, out tenantIdGuid))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public MicrosoftGraphClient MicrosoftGraphClient
{
if (_microsoftGraphClient == null)
{
_microsoftGraphClient = AzureSession.Instance.ClientFactory.CreateArmClient<MicrosoftGraphClient>(Context, AzureEnvironment.Endpoint.Graph);
_microsoftGraphClient = AzureSession.Instance.ClientFactory.CreateArmClient<MicrosoftGraphClient>(Context, AzureEnvironment.ExtendedEndpoint.MicrosoftGraphUrl);
_microsoftGraphClient.TenantID = Context.Tenant.Id;
}
return _microsoftGraphClient;
Expand Down Expand Up @@ -316,7 +316,7 @@ protected Guid GetTenantId()
{
var tenantIdStr = Context.Tenant.Id.ToString();
string adTenant = Context.Environment.GetEndpoint(AzureEnvironment.Endpoint.AdTenant);
string graph = Context.Environment.GetEndpoint(AzureEnvironment.Endpoint.Graph);
string graph = Context.Environment.GetEndpoint(AzureEnvironment.ExtendedEndpoint.MicrosoftGraphUrl);
var tenantIdGuid = Guid.Empty;

if (string.IsNullOrWhiteSpace(tenantIdStr) || !Guid.TryParse(tenantIdStr, out tenantIdGuid))
Expand Down