Skip to content

Convert from azuread_conditional_access_policy to msgraph_resource#27

Closed
mikejwhat wants to merge 3 commits intomainfrom
feat/convert-to-msgraph-resource
Closed

Convert from azuread_conditional_access_policy to msgraph_resource#27
mikejwhat wants to merge 3 commits intomainfrom
feat/convert-to-msgraph-resource

Conversation

@mikejwhat
Copy link
Contributor

what

  • Migrate from azuread_conditional_access_policy to msgraph_resource in order to support authentication contexts

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

- 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.
@mikejwhat mikejwhat requested a review from Copilot February 6, 2026 16:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_policy resource with msgraph_resource using 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>
Copy link

@simonboichat-appvia simonboichat-appvia left a comment

Choose a reason for hiding this comment

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

Looking pretty like pretty complex conditionals now :-)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mikejwhat mikejwhat closed this Feb 13, 2026
@mikejwhat mikejwhat deleted the feat/convert-to-msgraph-resource branch February 13, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants