Skip to content
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

Add constructor taking tenant id as parameter for AzureCredentials constructor when using MSI #662

Merged
merged 1 commit into from
Jul 10, 2019

Conversation

michaelelleby
Copy link
Contributor

Fixes #661

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@michaelelleby michaelelleby changed the title Add constructor taking tenant id as parameter for AzureCredentials Add constructor taking tenant id as parameter for AzureCredentials constructor when using MSI May 15, 2019
@loarabia loarabia added Authorization customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt Management plane SDK related issues. labels Jun 28, 2019
@yaohaizh yaohaizh closed this Jul 1, 2019
@yaohaizh yaohaizh reopened this Jul 1, 2019
@@ -81,6 +81,12 @@ public AzureCredentials(MSILoginInformation msiLoginInformation, AzureEnvironmen
this.msiTokenProviderFactory = new MSITokenProviderFactory(msiLoginInformation);
}

public AzureCredentials(MSILoginInformation msiLoginInformation, string tenantId, AzureEnvironment environment)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the tenantId is required, please change the above constructor directly, but not provide another one.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the teantId as optional parameter as the last one and default value to null would be better, but not provide another API. Thanks.

@praries880 praries880 added this to the v1.24 milestone Jul 8, 2019
@@ -81,6 +81,12 @@ public AzureCredentials(MSILoginInformation msiLoginInformation, AzureEnvironmen
this.msiTokenProviderFactory = new MSITokenProviderFactory(msiLoginInformation);
}

public AzureCredentials(MSILoginInformation msiLoginInformation, string tenantId, AzureEnvironment environment)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the teantId as optional parameter as the last one and default value to null would be better, but not provide another API. Thanks.

@yaohaizh
Copy link

@michaelelleby could you help update this PR? Thanks.

@msftclas
Copy link

msftclas commented Jul 10, 2019

CLA assistant check
All CLA requirements met.

@michaelelleby michaelelleby force-pushed the msi-authentication-with-tenant branch from b3e1ab5 to fcd2030 Compare July 10, 2019 06:15
@michaelelleby
Copy link
Contributor Author

@yaohaizh I have updated the PR, to avoid introducing any breaking changes to the SDK.

@yaohaizh
Copy link

Thanks for your contributions!

@yaohaizh yaohaizh merged commit 0546b57 into Azure:master Jul 10, 2019
@michaelelleby michaelelleby deleted the msi-authentication-with-tenant branch July 10, 2019 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authorization customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt Management plane SDK related issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]Cannot query Azure AD with system managed identity
6 participants