diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.html b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.html
index a10621d0ef..259cdc530c 100644
--- a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.html
+++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.html
@@ -25,9 +25,14 @@
- {{
- 'IDP.UPDATECLIENTSECRET' | translate
- }}
+ {{ 'IDP.UPDATECLIENTSECRET' | translate }}
+
{{ 'IDP.CLIENTSECRET' | translate }}
@@ -85,7 +90,7 @@
-
+
{{ 'IDP.AZUREADTENANTID' | translate }}
diff --git a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.ts b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.ts
index df188d9cd2..0933433a67 100644
--- a/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.ts
+++ b/console/src/app/modules/providers/provider-azure-ad/provider-azure-ad.component.ts
@@ -44,7 +44,10 @@ export class ProviderAzureADComponent {
public provider?: Provider.AsObject;
public updateClientSecret: boolean = false;
+
+ public AzureTenantIDType: number = 3;
public tenantTypes = [
+ this.AzureTenantIDType,
AzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON,
AzureADTenantType.AZURE_AD_TENANT_TYPE_ORGANISATIONS,
AzureADTenantType.AZURE_AD_TENANT_TYPE_CONSUMERS,
@@ -126,15 +129,34 @@ export class ProviderAzureADComponent {
: new MgmtGetProviderByIDRequest();
req.setId(id);
this.service
- .getProviderByID(req)
+ .getProviderID(req)
.then((resp) => {
- this.provider = resp.idp;
+ const object = resp.toObject();
+ this.provider = object.idp;
this.loading = false;
if (this.provider?.config?.azureAd) {
this.form.patchValue(this.provider.config.azureAd);
this.name?.setValue(this.provider.name);
this.tenantId?.setValue(this.provider.config.azureAd.tenant?.tenantId);
this.tenantType?.setValue(this.provider.config.azureAd.tenant?.tenantType);
+
+ const tenant = resp.getIdp()?.getConfig()?.getAzureAd()?.getTenant();
+
+ if (tenant) {
+ switch (tenant.getTypeCase()) {
+ case AzureADTenant.TypeCase.TENANT_ID:
+ this.tenantId?.setValue(tenant.getTenantId());
+ this.tenantType?.setValue(this.AzureTenantIDType);
+ break;
+ case AzureADTenant.TypeCase.TENANT_TYPE:
+ this.tenantType?.setValue(tenant.getTenantType());
+ this.tenantId?.setValue('');
+ break;
+ case AzureADTenant.TypeCase.TYPE_NOT_SET:
+ this.tenantType?.setValue(this.AzureTenantIDType);
+ break;
+ }
+ }
}
})
.catch((error) => {
@@ -159,8 +181,11 @@ export class ProviderAzureADComponent {
req.setEmailVerified(this.emailVerified?.value);
const tenant = new AzureADTenant();
- tenant.setTenantId(this.tenantId?.value);
- tenant.setTenantType(this.tenantType?.value);
+ if (this.tenantType?.value === this.AzureTenantIDType) {
+ tenant.setTenantId(this.tenantId?.value);
+ } else {
+ tenant.setTenantType(this.tenantType?.value);
+ }
req.setTenant(tenant);
req.setScopesList(this.scopesList?.value);
@@ -194,9 +219,11 @@ export class ProviderAzureADComponent {
req.setEmailVerified(this.emailVerified?.value);
const tenant = new AzureADTenant();
-
- tenant.setTenantId(this.tenantId?.value);
- tenant.setTenantType(this.tenantType?.value);
+ if (this.tenantType?.value === this.AzureTenantIDType) {
+ tenant.setTenantId(this.tenantId?.value);
+ } else {
+ tenant.setTenantType(this.tenantType?.value);
+ }
req.setTenant(tenant);
req.setScopesList(this.scopesList?.value);
diff --git a/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html b/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html
index f0c439d298..a4511570a6 100644
--- a/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html
+++ b/console/src/app/modules/providers/provider-github-es/provider-github-es.component.html
@@ -40,9 +40,14 @@
- {{
- 'IDP.UPDATECLIENTSECRET' | translate
- }}
+ {{ 'IDP.UPDATECLIENTSECRET' | translate }}
+
{{ 'IDP.CLIENTSECRET' | translate }}
diff --git a/console/src/app/modules/providers/provider-github-es/provider-github-es.component.ts b/console/src/app/modules/providers/provider-github-es/provider-github-es.component.ts
index 3264f0b297..847006e7f4 100644
--- a/console/src/app/modules/providers/provider-github-es/provider-github-es.component.ts
+++ b/console/src/app/modules/providers/provider-github-es/provider-github-es.component.ts
@@ -153,6 +153,7 @@ export class ProviderGithubESComponent {
req.setClientId(this.clientId?.value);
req.setClientSecret(this.clientSecret?.value);
req.setScopesList(this.scopesList?.value);
+ req.setProviderOptions(this.options);
this.loading = true;
this.service
@@ -183,6 +184,7 @@ export class ProviderGithubESComponent {
req.setClientId(this.clientId?.value);
req.setClientSecret(this.clientSecret?.value);
req.setScopesList(this.scopesList?.value);
+ req.setProviderOptions(this.options);
this.loading = true;
this.service
diff --git a/console/src/app/modules/providers/provider-github/provider-github.component.html b/console/src/app/modules/providers/provider-github/provider-github.component.html
index 8b40a2070e..540c178709 100644
--- a/console/src/app/modules/providers/provider-github/provider-github.component.html
+++ b/console/src/app/modules/providers/provider-github/provider-github.component.html
@@ -21,9 +21,14 @@
- {{
- 'IDP.UPDATECLIENTSECRET' | translate
- }}
+ {{ 'IDP.UPDATECLIENTSECRET' | translate }}
+
{{ 'IDP.CLIENTSECRET' | translate }}
diff --git a/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html b/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html
index 194e9dbede..61df5dfbbc 100644
--- a/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html
+++ b/console/src/app/modules/providers/provider-gitlab-self-hosted/provider-gitlab-self-hosted.component.html
@@ -30,9 +30,14 @@
- {{
- 'IDP.UPDATECLIENTSECRET' | translate
- }}
+ {{ 'IDP.UPDATECLIENTSECRET' | translate }}
+
{{ 'IDP.CLIENTSECRET' | translate }}
diff --git a/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html b/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html
index 0ef22147de..c4ec64094b 100644
--- a/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html
+++ b/console/src/app/modules/providers/provider-gitlab/provider-gitlab.component.html
@@ -20,9 +20,14 @@
- {{
- 'IDP.UPDATECLIENTSECRET' | translate
- }}
+ {{ 'IDP.UPDATECLIENTSECRET' | translate }}
+
{{ 'IDP.CLIENTSECRET' | translate }}
diff --git a/console/src/app/modules/providers/provider-google/provider-google.component.html b/console/src/app/modules/providers/provider-google/provider-google.component.html
index 912d4fd8b5..a77006c7af 100644
--- a/console/src/app/modules/providers/provider-google/provider-google.component.html
+++ b/console/src/app/modules/providers/provider-google/provider-google.component.html
@@ -20,9 +20,13 @@
- {{
- 'IDP.UPDATECLIENTSECRET' | translate
- }}
+ {{ 'IDP.UPDATECLIENTSECRET' | translate }}
{{ 'IDP.CLIENTSECRET' | translate }}
diff --git a/console/src/app/modules/providers/provider-ldap/provider-ldap.component.html b/console/src/app/modules/providers/provider-ldap/provider-ldap.component.html
index ee49949346..28b7f5ec6f 100644
--- a/console/src/app/modules/providers/provider-ldap/provider-ldap.component.html
+++ b/console/src/app/modules/providers/provider-ldap/provider-ldap.component.html
@@ -39,9 +39,13 @@
- {{
- 'IDP.UPDATEBINDPASSWORD' | translate
- }}
+ {{ 'IDP.UPDATEBINDPASSWORD' | translate }}
{{ 'IDP.BINDPASSWORD' | translate }}
diff --git a/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html b/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html
index b88aece27d..da85abb3a3 100644
--- a/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html
+++ b/console/src/app/modules/providers/provider-oauth/provider-oauth.component.html
@@ -13,40 +13,45 @@
{{ 'IDP.CREATE.OAUTH.DESCRIPTION' | translate }}