Convert from azuread_conditional_access_policy to msgraph_resource#27
Closed
Convert from azuread_conditional_access_policy to msgraph_resource#27
Conversation
- Update provider from AzureAD to MSGraph in Terraform files. - Modify resource definitions and outputs to align with MSGraph. - Add variable for included authentication context class references.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the conditional access policy implementation from the azuread provider to the msgraph provider to enable support for authentication context class references, a feature not yet available in the azuread_conditional_access_policy resource.
Changes:
- Replaced
azuread_conditional_access_policyresource withmsgraph_resourceusing direct API calls - Added support for authentication context class references (c1-c25) as a new application condition type
- Restructured resource configuration to use JSON body format compatible with Microsoft Graph API
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| azurerm-conditional-access/variables.tf | Adds new variable for authentication context class references with validation |
| azurerm-conditional-access/terraform.tf | Updates provider requirement from azuread ~> 3.7 to msgraph ~> 0.3 |
| azurerm-conditional-access/outputs.tf | Updates outputs to reference msgraph_resource and adds new resource_url output |
| azurerm-conditional-access/main.tf | Replaces azuread resource with msgraph_resource, restructures configuration into JSON body format |
| azurerm-conditional-access/README.md | Updates documentation to reflect provider and resource changes |
Files not reviewed (1)
- azurerm-conditional-access/.terraform.lock.hcl: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
simonboichat-appvia
previously approved these changes
Feb 6, 2026
simonboichat-appvia
left a comment
There was a problem hiding this comment.
Looking pretty like pretty complex conditionals now :-)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
why
azuread_conditional_access_policy doesn't yet support this feature.
references
Looks like someone has being trying to get a fix through for some time: hashicorp/terraform-provider-azuread#1534