Skip to content

Commit

Permalink
feat: grant admin consent for delegated permission in sso module
Browse files Browse the repository at this point in the history
  • Loading branch information
malhussan committed Oct 17, 2024
1 parent a69615e commit eb74afd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ Before opening a Pull Request, please do the following:

| Name | Version |
|------|---------|
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 2.53.1 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.114.0 |
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 3.0.2 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.5.0 |

## Modules

Expand Down
6 changes: 3 additions & 3 deletions modules/meshcloud-metering-service-principal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

| Name | Version |
|------|---------|
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 2.53.1 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.114.0 |
| <a name="provider_time"></a> [time](#provider\_time) | 0.12.0 |
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 3.0.2 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.5.0 |
| <a name="provider_time"></a> [time](#provider\_time) | 0.12.1 |

## Modules

Expand Down
6 changes: 3 additions & 3 deletions modules/meshcloud-replicator-service-principal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

| Name | Version |
|------|---------|
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 2.53.1 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.114.0 |
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 3.0.2 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.5.0 |
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |
| <a name="provider_time"></a> [time](#provider\_time) | 0.12.0 |
| <a name="provider_time"></a> [time](#provider\_time) | 0.12.1 |

## Modules

Expand Down
3 changes: 2 additions & 1 deletion modules/meshcloud-sso/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

| Name | Version |
|------|---------|
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 2.53.1 |
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 3.0.2 |

## Modules

Expand All @@ -23,6 +23,7 @@ No modules.
| [azuread_application.meshcloud_sso](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application) | resource |
| [azuread_application_password.meshcloud_sso](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_password) | resource |
| [azuread_service_principal.meshcloud_sso](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/service_principal) | resource |
| [azuread_service_principal_delegated_permission_grant.meshcloud_sso](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/service_principal_delegated_permission_grant) | resource |
| [azuread_application_published_app_ids.well_known](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/data-sources/application_published_app_ids) | data source |
| [azuread_application_template.enterprise_app](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/data-sources/application_template) | data source |
| [azuread_client_config.current](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/data-sources/client_config) | data source |
Expand Down
6 changes: 6 additions & 0 deletions modules/meshcloud-sso/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ resource "azuread_service_principal" "meshcloud_sso" {
resource "azuread_application_password" "meshcloud_sso" {
application_id = azuread_application.meshcloud_sso.id
}

resource "azuread_service_principal_delegated_permission_grant" "meshcloud_sso" {
service_principal_object_id = azuread_service_principal.meshcloud_sso.object_id
resource_service_principal_object_id = data.azuread_service_principal.msgraph.object_id
claim_values = ["User.Read"]
}

0 comments on commit eb74afd

Please sign in to comment.