├── internal ├── services │ ├── resources │ │ ├── files │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── m365_admin │ │ │ └── graph_v1.0 │ │ │ │ └── _._ │ │ ├── applications │ │ │ ├── graph_v1.0 │ │ │ │ └── _.stub │ │ │ └── graph_beta │ │ │ │ ├── ip_application_segment │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── validate_delete │ │ │ │ │ │ └── get_ip_application_segment_not_found.json │ │ │ │ │ ├── validate_get │ │ │ │ │ │ ├── get_ip_application_segment_minimal.json │ │ │ │ │ │ └── get_ip_application_segment_maximal.json │ │ │ │ │ ├── validate_update │ │ │ │ │ │ └── patch_ip_application_segment_success.json │ │ │ │ │ └── validate_create │ │ │ │ │ │ └── post_ip_application_segment_success.json │ │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ ├── resource_fqdn.tf │ │ │ │ │ └── resource_ip_range.tf │ │ │ │ └── service_principal_app_role_assigned_to │ │ │ │ └── tests │ │ │ │ └── responses │ │ │ │ └── validate_delete │ │ │ │ └── get_app_role_assignment_not_found.json │ │ ├── education │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── extensions │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── financials │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── security │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── backup_storage │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── industry_data_etl │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── sites_and_lists │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── device_and_app_management │ │ │ ├── graph_v1.0 │ │ │ │ └── _.stub │ │ │ └── graph_beta │ │ │ │ ├── targeted_managed_app_configuration │ │ │ │ └── helpers.go │ │ │ │ ├── application_category │ │ │ │ └── resource_docs │ │ │ │ │ └── resource_model.json │ │ │ │ ├── ios_managed_mobile_app │ │ │ │ └── mocks │ │ │ │ │ └── terraform │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ └── resource_maximal.tf │ │ │ │ ├── android_managed_mobile_app │ │ │ │ └── mocks │ │ │ │ │ └── terraform │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ └── resource_maximal.tf │ │ │ │ ├── windows_managed_mobile_app │ │ │ │ └── mocks │ │ │ │ │ └── terraform │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ └── resource_maximal.tf │ │ │ │ └── ios_managed_device_app_configuration_policy │ │ │ │ └── tests │ │ │ │ └── responses │ │ │ │ └── validate_create │ │ │ │ └── post_ios_mobile_app_configuration_error.json │ │ ├── external_data_connections │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── teamwork_and_communications │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── people_and_workplace_intelligence │ │ │ ├── graph_beta │ │ │ │ └── _.stub │ │ │ └── graph_v1.0 │ │ │ │ └── _.stub │ │ ├── device_management │ │ │ └── graph_beta │ │ │ │ ├── intune_branding_profile │ │ │ │ └── resource_docs │ │ │ │ │ └── patch_req_during_create.md │ │ │ │ ├── windows_driver_update_profile │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_delete │ │ │ │ │ └── delete_windows_driver_update_profile_success.json │ │ │ │ │ ├── validate_assign │ │ │ │ │ ├── post_windows_driver_update_profile_assign_success.json │ │ │ │ │ └── post_windows_driver_update_profile_assign_error.json │ │ │ │ │ └── validate_create │ │ │ │ │ └── post_windows_driver_update_profile_error.json │ │ │ │ ├── windows_enrollment_status_page │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_assign │ │ │ │ │ └── post_windows_enrollment_status_page_assign_success.json │ │ │ │ │ └── validate_get │ │ │ │ │ └── get_windows_enrollment_status_pages_list.json │ │ │ │ ├── device_enrollment_notification │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ └── validate_assign │ │ │ │ │ └── post_android_enrollment_notifications_assign_success.json │ │ │ │ ├── endpoint_privilege_management_json │ │ │ │ └── resource_docs │ │ │ │ │ └── research.md │ │ │ │ ├── reuseable_policy_settings │ │ │ │ └── resource_docs │ │ │ │ │ └── research.md │ │ │ │ ├── managed_device_cleanup_rule │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── validate_error │ │ │ │ │ │ ├── error_resource_not_found.json │ │ │ │ │ │ └── error_duplicate_platform.json │ │ │ │ │ └── validate_update │ │ │ │ │ │ └── patch_managed_device_cleanup_rule_minimal.json │ │ │ │ │ └── terraform │ │ │ │ │ ├── acceptance │ │ │ │ │ ├── resource_missing_display_name.tf │ │ │ │ │ ├── platform_ios.tf │ │ │ │ │ ├── platform_all.tf │ │ │ │ │ ├── platform_macOS.tf │ │ │ │ │ ├── platform_windows.tf │ │ │ │ │ ├── platform_chromeOS.tf │ │ │ │ │ ├── resource_invalid_platform.tf │ │ │ │ │ ├── platform_androidAOSP.tf │ │ │ │ │ └── resource_minimal.tf │ │ │ │ │ └── unit │ │ │ │ │ ├── platform_ios.tf │ │ │ │ │ ├── platform_macOS.tf │ │ │ │ │ ├── platform_all.tf │ │ │ │ │ ├── platform_windows.tf │ │ │ │ │ ├── platform_chromeOS.tf │ │ │ │ │ └── platform_androidAOSP.tf │ │ │ │ ├── role_scope_tag │ │ │ │ ├── resource_docs │ │ │ │ │ └── model.json │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_update │ │ │ │ │ └── get_role_scope_tag_updated.json │ │ │ │ │ ├── validate_delete │ │ │ │ │ └── get_role_scope_tag_not_found.json │ │ │ │ │ └── validate_create │ │ │ │ │ ├── post_role_scope_tag_error.json │ │ │ │ │ ├── get_role_scope_tag_maximal.json │ │ │ │ │ └── get_role_scope_tag_minimal.json │ │ │ │ ├── linux_platform_script │ │ │ │ └── resource_docs │ │ │ │ │ └── group_assignment_model.json │ │ │ │ ├── app_control_for_business_built_in_controls │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_delete │ │ │ │ │ └── get_app_control_not_found.json │ │ │ │ │ ├── validate_assign │ │ │ │ │ └── post_app_control_assign_error.json │ │ │ │ │ ├── validate_create │ │ │ │ │ └── post_app_control_error.json │ │ │ │ │ ├── validate_get │ │ │ │ │ └── get_app_control_list.json │ │ │ │ │ └── validate_update │ │ │ │ │ └── patch_app_control_success.json │ │ │ │ ├── app_control_for_business_policy │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ └── validate_get │ │ │ │ │ └── get_policy_list.json │ │ │ │ ├── windows_platform_script │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_get │ │ │ │ │ └── get_windows_platform_scripts_list.json │ │ │ │ │ ├── validate_create │ │ │ │ │ ├── post_windows_platform_script_error.json │ │ │ │ │ ├── post_windows_platform_script_system_success.json │ │ │ │ │ └── post_windows_platform_script_user_success.json │ │ │ │ │ └── validate_delete │ │ │ │ │ └── get_windows_platform_script_not_found.json │ │ │ │ ├── device_category │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── validate_create │ │ │ │ │ │ ├── get_device_category_minimal.json │ │ │ │ │ │ ├── get_device_category_maximal.json │ │ │ │ │ │ └── post_device_category_error.json │ │ │ │ │ ├── validate_update │ │ │ │ │ │ └── get_device_category_updated.json │ │ │ │ │ └── validate_delete │ │ │ │ │ │ └── get_device_category_not_found.json │ │ │ │ │ └── terraform │ │ │ │ │ ├── acceptance │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ └── resource_role_scope_tags.tf │ │ │ │ │ └── unit │ │ │ │ │ └── resource_minimal.tf │ │ │ │ ├── assignment_filter │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_create │ │ │ │ │ ├── post_assignment_filter.json │ │ │ │ │ └── post_assignment_filter_error.json │ │ │ │ │ ├── validate_update │ │ │ │ │ └── get_assignment_filter_updated.json │ │ │ │ │ └── validate_delete │ │ │ │ │ └── get_assignment_filter_not_found.json │ │ │ │ ├── windows_device_compliance_script │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_get │ │ │ │ │ └── get_windows_device_compliance_scripts_list.json │ │ │ │ │ └── validate_create │ │ │ │ │ └── post_windows_device_compliance_script_error.json │ │ │ │ ├── windows_device_compliance_policy │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ └── validate_get │ │ │ │ │ └── get_windows_device_compliance_policies_list.json │ │ │ │ ├── windows_quality_update_policy │ │ │ │ └── tests │ │ │ │ │ ├── terraform │ │ │ │ │ ├── acceptance │ │ │ │ │ │ └── resource_minimal.tf │ │ │ │ │ └── unit │ │ │ │ │ │ └── resource_minimal.tf │ │ │ │ │ └── responses │ │ │ │ │ └── validate_create │ │ │ │ │ └── post_windows_quality_update_policy_error.json │ │ │ │ ├── rbac_resource_operation │ │ │ │ └── resource_docs │ │ │ │ │ └── resource.json │ │ │ │ ├── role_definition │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_delete │ │ │ │ │ └── get_role_definition_not_found.json │ │ │ │ │ └── validate_create │ │ │ │ │ └── get_role_definition_no_permissions.json │ │ │ │ ├── macos_device_configuration_templates │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ └── MicrosoftRootCertificateAuthority2011.cer │ │ │ │ │ └── acceptance │ │ │ │ │ └── MicrosoftRootCertificateAuthority2011.cer │ │ │ │ ├── macos_custom_attribute_script │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ └── acceptance │ │ │ │ │ ├── resource_missing_script_content.tf │ │ │ │ │ ├── resource_missing_custom_attribute_type.tf │ │ │ │ │ ├── resource_missing_display_name.tf │ │ │ │ │ ├── resource_missing_file_name.tf │ │ │ │ │ └── resource_missing_run_as_account.tf │ │ │ │ ├── windows_autopilot_deployment_profile │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ └── validate_get │ │ │ │ │ └── get_group.json │ │ │ │ ├── settings_catalog_configuration_policy │ │ │ │ └── validator.go │ │ │ │ ├── windows_remediation_script │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ └── validate_delete │ │ │ │ │ └── get_windows_remediation_script_not_found.json │ │ │ │ ├── terms_and_conditions │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ └── validate_delete │ │ │ │ │ └── get_terms_and_conditions_not_found.json │ │ │ │ ├── windows_update_ring │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ └── validate_delete │ │ │ │ │ └── get_windows_update_ring_not_found.json │ │ │ │ └── windows_feature_update_profile │ │ │ │ └── tests │ │ │ │ └── responses │ │ │ │ └── validate_create │ │ │ │ └── post_windows_feature_update_profile_error.json │ │ ├── agents │ │ │ └── graph_beta │ │ │ │ ├── agent_identity_blueprint_password_credential │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_delete │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── validate_read │ │ │ │ │ └── .gitkeep │ │ │ │ ├── agent_identity_blueprint_service_principal │ │ │ │ ├── timeouts.go │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ └── error_not_found.json │ │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ └── resource_minimal.tf │ │ │ │ ├── agent_instance │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ └── error_not_found.json │ │ │ │ ├── agent_identity │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ ├── error_not_found.json │ │ │ │ │ └── validate_read │ │ │ │ │ ├── get_sponsors_success.json │ │ │ │ │ └── get_owners_success.json │ │ │ │ ├── agent_user │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ ├── error_not_found.json │ │ │ │ │ ├── error_display_name_required.json │ │ │ │ │ └── validate_read │ │ │ │ │ └── get_sponsors_success.json │ │ │ │ ├── agent_identity_blueprint │ │ │ │ └── tests │ │ │ │ │ └── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ ├── error_not_found.json │ │ │ │ │ └── validate_read │ │ │ │ │ ├── get_owners_success.json │ │ │ │ │ ├── get_sponsors_success.json │ │ │ │ │ └── get_user_success.json │ │ │ │ ├── agent_collection │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── validate_list │ │ │ │ │ │ └── list_agent_collections_empty.json │ │ │ │ │ ├── error_not_found.json │ │ │ │ │ └── error_bad_request.json │ │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ └── resource_update_minimal.tf │ │ │ │ └── agent_collection_assignment │ │ │ │ ├── tests │ │ │ │ ├── responses │ │ │ │ │ ├── validate_read │ │ │ │ │ │ └── list_members_empty.json │ │ │ │ │ ├── validate_create │ │ │ │ │ │ └── post_assignment_minimal.json │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ └── error_not_found.json │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ └── resource_minimal.tf │ │ │ │ └── resource_acceptance_test.go │ │ ├── copilot │ │ │ └── docs.md │ │ ├── _resource_template │ │ │ └── resource_docs │ │ │ │ └── resource_model.json │ │ ├── identity_and_access │ │ │ ├── graph_beta │ │ │ │ ├── authentication_strength_policy │ │ │ │ │ └── tests │ │ │ │ │ │ ├── responses │ │ │ │ │ │ ├── validate_update │ │ │ │ │ │ │ └── patch_authentication_strength_policy_success.json │ │ │ │ │ │ ├── validate_delete │ │ │ │ │ │ │ └── get_authentication_strength_policy_not_found.json │ │ │ │ │ │ └── validate_create │ │ │ │ │ │ │ └── get_authentication_strength_policies_empty.json │ │ │ │ │ │ └── terraform │ │ │ │ │ │ └── unit │ │ │ │ │ │ └── resource_auth_strength_minimal.tf │ │ │ │ ├── network_filtering_policy │ │ │ │ │ └── tests │ │ │ │ │ │ ├── responses │ │ │ │ │ │ ├── license │ │ │ │ │ │ │ └── get_subscribed_skus_no_license.json │ │ │ │ │ │ ├── validate_update │ │ │ │ │ │ │ └── get_filtering_policy_updated.json │ │ │ │ │ │ ├── validate_create │ │ │ │ │ │ │ ├── post_filtering_policy.json │ │ │ │ │ │ │ └── post_filtering_policy_error.json │ │ │ │ │ │ └── validate_delete │ │ │ │ │ │ │ └── get_filtering_policy_not_found.json │ │ │ │ │ │ └── terraform │ │ │ │ │ │ └── unit │ │ │ │ │ │ ├── resource_updated.tf │ │ │ │ │ │ ├── resource_invalid.tf │ │ │ │ │ │ └── resource_minimal.tf │ │ │ │ ├── attribute_set │ │ │ │ │ ├── tests │ │ │ │ │ │ ├── responses │ │ │ │ │ │ │ ├── validate_create │ │ │ │ │ │ │ │ ├── post_attribute_set.json │ │ │ │ │ │ │ │ └── post_attribute_set_error.json │ │ │ │ │ │ │ ├── validate_update │ │ │ │ │ │ │ │ └── get_attribute_set_updated.json │ │ │ │ │ │ │ └── validate_delete │ │ │ │ │ │ │ │ └── get_attribute_set_not_found.json │ │ │ │ │ │ └── terraform │ │ │ │ │ │ │ └── unit │ │ │ │ │ │ │ └── test_config_minimal.tf │ │ │ │ │ └── resource_docs │ │ │ │ │ │ └── create.md │ │ │ │ ├── named_location │ │ │ │ │ └── tests │ │ │ │ │ │ ├── responses │ │ │ │ │ │ └── validate_delete │ │ │ │ │ │ │ └── get_named_location_not_found.json │ │ │ │ │ │ └── terraform │ │ │ │ │ │ └── unit │ │ │ │ │ │ ├── resource_ip_minimal.tf │ │ │ │ │ │ └── resource_ip_ipv6_only.tf │ │ │ │ ├── authentication_context │ │ │ │ │ └── tests │ │ │ │ │ │ ├── terraform │ │ │ │ │ │ └── acceptance │ │ │ │ │ │ │ ├── 04_minimal.tf │ │ │ │ │ │ │ └── 03_import.tf │ │ │ │ │ │ └── responses │ │ │ │ │ │ ├── validate_create │ │ │ │ │ │ ├── get_authentication_contexts_empty.json │ │ │ │ │ │ └── post_authentication_context_error.json │ │ │ │ │ │ ├── validate_delete │ │ │ │ │ │ └── get_authentication_context_not_found.json │ │ │ │ │ │ └── validate_get │ │ │ │ │ │ └── get_authentication_context.json │ │ │ │ ├── custom_security_attribute_allowed_value │ │ │ │ │ └── tests │ │ │ │ │ │ ├── responses │ │ │ │ │ │ ├── post_allowed_value.json │ │ │ │ │ │ └── get_allowed_value_updated.json │ │ │ │ │ │ └── terraform │ │ │ │ │ │ └── unit │ │ │ │ │ │ ├── test_config_basic.tf │ │ │ │ │ │ ├── test_config_inactive.tf │ │ │ │ │ │ ├── test_config_minimal.tf │ │ │ │ │ │ ├── test_config_update.tf │ │ │ │ │ │ └── test_config_with_spaces.tf │ │ │ │ └── directory_settings │ │ │ │ │ └── resource_docs │ │ │ │ │ └── reqs.md │ │ │ └── graph_v1.0 │ │ │ │ └── conditional_access_terms_of_use │ │ │ │ └── tests │ │ │ │ └── responses │ │ │ │ ├── validate_create │ │ │ │ └── post_agreement_error.json │ │ │ │ └── validate_delete │ │ │ │ └── get_agreement_not_found.json │ │ ├── users │ │ │ └── graph_beta │ │ │ │ ├── user │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ └── error_not_found.json │ │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ └── resource_invalid.tf │ │ │ │ ├── user_manager │ │ │ │ └── tests │ │ │ │ │ ├── terraform │ │ │ │ │ └── unit │ │ │ │ │ │ └── resource_minimal.tf │ │ │ │ │ └── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ ├── error_not_found.json │ │ │ │ │ └── validate_read │ │ │ │ │ └── get_manager_success.json │ │ │ │ ├── license_assignment │ │ │ │ └── tests │ │ │ │ │ ├── terraform │ │ │ │ │ └── unit │ │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ │ └── resource_maximal.tf │ │ │ │ │ └── responses │ │ │ │ │ ├── validate_create │ │ │ │ │ └── post_user_error.json │ │ │ │ │ └── validate_delete │ │ │ │ │ └── get_user_not_found.json │ │ │ │ └── user_mailbox_settings │ │ │ │ └── tests │ │ │ │ ├── terraform │ │ │ │ └── unit │ │ │ │ │ └── resource_minimal.tf │ │ │ │ └── responses │ │ │ │ └── mailbox_settings_minimal.json │ │ ├── groups │ │ │ └── graph_beta │ │ │ │ ├── group │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── error_bad_request.json │ │ │ │ │ ├── error_not_found.json │ │ │ │ │ └── validate_error │ │ │ │ │ │ └── error_invalid_display_name.json │ │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ └── resource_scenario_1_security_group_assigned.tf │ │ │ │ ├── group_lifecycle_expiration_policy_assignment │ │ │ │ └── tests │ │ │ │ │ ├── responses │ │ │ │ │ ├── validate_create │ │ │ │ │ │ ├── post_addgroup_success.json │ │ │ │ │ │ └── post_removegroup_success.json │ │ │ │ │ └── validate_error │ │ │ │ │ │ └── error_no_policy_found.json │ │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ └── resource_basic.tf │ │ │ │ ├── license_assignment │ │ │ │ └── tests │ │ │ │ │ ├── terraform │ │ │ │ │ └── unit │ │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ │ └── resource_maximal.tf │ │ │ │ │ └── responses │ │ │ │ │ └── validate_create │ │ │ │ │ └── post_group_error.json │ │ │ │ ├── group_owner_assignment │ │ │ │ └── mocks │ │ │ │ │ └── terraform │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ └── resource_maximal.tf │ │ │ │ ├── group_member_assignment │ │ │ │ └── mocks │ │ │ │ │ └── terraform │ │ │ │ │ ├── resource_maximal.tf │ │ │ │ │ └── resource_minimal.tf │ │ │ │ └── group_lifecycle_expiration_policy │ │ │ │ └── tests │ │ │ │ ├── terraform │ │ │ │ ├── unit │ │ │ │ │ ├── resource_all.tf │ │ │ │ │ ├── resource_none.tf │ │ │ │ │ ├── resource_maximal.tf │ │ │ │ │ └── resource_selected.tf │ │ │ │ └── acceptance │ │ │ │ │ ├── resource_all.tf │ │ │ │ │ ├── resource_minimal.tf │ │ │ │ │ ├── resource_none.tf │ │ │ │ │ ├── resource_maximal.tf │ │ │ │ │ └── resource_selected.tf │ │ │ │ └── responses │ │ │ │ └── validate_create │ │ │ │ ├── get_policy_all.json │ │ │ │ ├── get_policy_none.json │ │ │ │ ├── post_policy_all.json │ │ │ │ └── post_policy_none.json │ │ └── windows_365 │ │ │ └── graph_beta │ │ │ └── cloud_pc_role_definition │ │ │ ├── constants.go │ │ │ └── tests │ │ │ └── responses │ │ │ ├── validate_delete │ │ │ └── get_role_definition_not_found.json │ │ │ └── validate_create │ │ │ └── get_role_definition_no_permissions.json │ ├── datasources │ │ ├── utility │ │ │ ├── macos_pkg_app_metadata │ │ │ │ ├── state.go │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ └── unit │ │ │ │ │ ├── 02_invalid_url.tf │ │ │ │ │ ├── 04_neither_provided.tf │ │ │ │ │ ├── 01_invalid_file_extension.tf │ │ │ │ │ ├── 06_valid_url.tf │ │ │ │ │ ├── 05_valid_file_path.tf │ │ │ │ │ └── 03_both_provided.tf │ │ │ ├── windows_msi_app_metadata │ │ │ │ ├── testdata │ │ │ │ │ └── invalid.txt │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── 08_missing_input.tf │ │ │ │ │ ├── 01_local_file.tf │ │ │ │ │ ├── 03_min_os_version.tf │ │ │ │ │ ├── 05_properties.tf │ │ │ │ │ ├── 06_architecture.tf │ │ │ │ │ ├── 02_url_source.tf │ │ │ │ │ ├── 07_files_and_features.tf │ │ │ │ │ ├── 11_invalid_msi_format.tf │ │ │ │ │ ├── 10_invalid_file_path.tf │ │ │ │ │ ├── 04_transform_paths.tf │ │ │ │ │ └── 09_both_inputs.tf │ │ │ │ │ └── acceptance │ │ │ │ │ └── datasource_firefox_msi.tf │ │ │ ├── itunes_app_metadata │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── datasource_empty.tf │ │ │ │ │ ├── datasource_error.tf │ │ │ │ │ ├── datasource_firefox.tf │ │ │ │ │ └── datasource_office.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── datasource_firefox.tf │ │ │ │ │ ├── datasource_teams.tf │ │ │ │ │ └── datasource_office.tf │ │ │ ├── microsoft_365_endpoint_reference │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── datasource_china.tf │ │ │ │ │ ├── datasource_usgov_dod.tf │ │ │ │ │ ├── datasource_worldwide.tf │ │ │ │ │ ├── datasource_usgov_gcchigh.tf │ │ │ │ │ ├── datasource_expressroute.tf │ │ │ │ │ ├── datasource_required_only.tf │ │ │ │ │ ├── datasource_filter_optimize.tf │ │ │ │ │ ├── datasource_filter_exchange.tf │ │ │ │ │ └── datasource_multiple_filters.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── datasource_worldwide.tf │ │ │ │ │ ├── datasource_expressroute.tf │ │ │ │ │ ├── datasource_required_only.tf │ │ │ │ │ ├── datasource_teams_media.tf │ │ │ │ │ └── datasource_filter_exchange_optimize.tf │ │ │ ├── entra_id_sid_converter │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── 07_neither_provided.tf │ │ │ │ │ ├── 05_invalid_guid_format.tf │ │ │ │ │ ├── 02_objectid_to_sid.tf │ │ │ │ │ ├── 01_sid_to_objectid.tf │ │ │ │ │ ├── 03_invalid_rid_exceeds_max.tf │ │ │ │ │ ├── 04_invalid_sid_format.tf │ │ │ │ │ └── 06_both_provided.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── 02_objectid_to_sid.tf │ │ │ │ │ ├── 03_max_uint32.tf │ │ │ │ │ ├── 01_sid_to_objectid.tf │ │ │ │ │ └── 04_bidirectional.tf │ │ │ ├── licensing_service_plan_reference │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── 08_no_params_provided.tf │ │ │ │ │ ├── 02_search_by_string_id.tf │ │ │ │ │ ├── 09_invalid_guid_format.tf │ │ │ │ │ ├── 01_search_by_product_name.tf │ │ │ │ │ ├── 03_search_by_guid.tf │ │ │ │ │ ├── 05_search_by_service_plan_id.tf │ │ │ │ │ ├── 04_search_by_service_plan_name.tf │ │ │ │ │ ├── 06_search_by_service_plan_guid.tf │ │ │ │ │ └── 07_multiple_params_provided.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── 01_search_by_product_name.tf │ │ │ │ │ ├── 02_search_by_string_id.tf │ │ │ │ │ └── 03_search_by_service_plan.tf │ │ │ ├── microsoft_store_package_manifest_metadata │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── 04_neither_provided.tf │ │ │ │ │ ├── 02_search_term.tf │ │ │ │ │ ├── 03_both_provided.tf │ │ │ │ │ └── 01_package_identifier.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── 04_multiple_results.tf │ │ │ │ │ ├── 02_search_term.tf │ │ │ │ │ ├── 01_package_identifier.tf │ │ │ │ │ └── 03_validate_structure.tf │ │ │ └── windows_remediation_script_registry_key_generator │ │ │ │ └── tests │ │ │ │ └── terraform │ │ │ │ ├── unit │ │ │ │ ├── 04_binary.tf │ │ │ │ ├── 05_invalid_context.tf │ │ │ │ ├── 06_invalid_value_type.tf │ │ │ │ ├── 02_all_users_string.tf │ │ │ │ ├── 03_multistring.tf │ │ │ │ └── 07_invalid_dword_value.tf │ │ │ │ └── acceptance │ │ │ │ ├── 02_all_users_string.tf │ │ │ │ ├── 04_expand_string.tf │ │ │ │ └── 03_qword.tf │ │ ├── applications │ │ │ └── service_principle │ │ │ │ ├── tests │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── 01_all.tf │ │ │ │ │ ├── 02_by_id.tf │ │ │ │ │ ├── 03_by_app_id.tf │ │ │ │ │ ├── 04_by_display_name.tf │ │ │ │ │ ├── 06_odata_advanced.tf │ │ │ │ │ └── 05_odata_filter.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── 01_all.tf │ │ │ │ │ ├── 02_by_display_name.tf │ │ │ │ │ ├── 07_odata_search_only.tf │ │ │ │ │ ├── 03_by_app_id.tf │ │ │ │ │ ├── 04_odata_filter.tf │ │ │ │ │ └── 05_odata_advanced.tf │ │ │ │ └── helpers.go │ │ ├── device_management │ │ │ └── graph_beta │ │ │ │ └── managed_device │ │ │ │ └── tests │ │ │ │ └── terraform │ │ │ │ ├── unit │ │ │ │ ├── 01_all.tf │ │ │ │ ├── 02_by_id.tf │ │ │ │ ├── 03_by_device_name.tf │ │ │ │ ├── 04_by_serial_number.tf │ │ │ │ ├── 05_odata_filter.tf │ │ │ │ ├── 07_odata_comprehensive.tf │ │ │ │ └── 06_odata_advanced.tf │ │ │ │ └── acceptance │ │ │ │ ├── 01_all.tf │ │ │ │ ├── 02_by_device_name.tf │ │ │ │ ├── 03_odata_filter.tf │ │ │ │ ├── 05_odata_comprehensive.tf │ │ │ │ └── 04_odata_advanced.tf │ │ ├── identity_and_access │ │ │ └── graph_beta │ │ │ │ └── role_definitions │ │ │ │ ├── tests │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── 01_all.tf │ │ │ │ │ ├── 02_by_id.tf │ │ │ │ │ ├── 04_odata_filter.tf │ │ │ │ │ ├── 03_by_display_name.tf │ │ │ │ │ ├── 05_odata_advanced.tf │ │ │ │ │ └── 06_odata_comprehensive.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── 01_all.tf │ │ │ │ │ ├── 04_odata_filter.tf │ │ │ │ │ ├── 03_by_display_name.tf │ │ │ │ │ ├── 02_by_id.tf │ │ │ │ │ ├── 06_odata_comprehensive.tf │ │ │ │ │ └── 05_odata_advanced.tf │ │ │ │ └── helpers.go │ │ ├── device_and_app_management │ │ │ └── graph_beta │ │ │ │ ├── mobile_app_catalog_package │ │ │ │ └── tests │ │ │ │ │ └── terraform │ │ │ │ │ ├── unit │ │ │ │ │ ├── 01_all.tf │ │ │ │ │ ├── 02_by_id.tf │ │ │ │ │ ├── 03_by_product_name.tf │ │ │ │ │ ├── 04_by_publisher_name.tf │ │ │ │ │ ├── 06_odata_advanced.tf │ │ │ │ │ └── 05_odata_filter.tf │ │ │ │ │ └── acceptance │ │ │ │ │ ├── 01_all.tf │ │ │ │ │ ├── 02_by_id.tf │ │ │ │ │ ├── 03_by_product_name.tf │ │ │ │ │ ├── 04_by_publisher_name.tf │ │ │ │ │ └── 05_odata_filter.tf │ │ │ │ └── mobile_app_relationship │ │ │ │ └── helpers.go │ │ └── multitenant_management │ │ │ └── graph_beta │ │ │ ├── audit_events │ │ │ └── helpers.go │ │ │ └── aggregated_policy_compliances │ │ │ └── helpers.go │ ├── actions │ │ └── device_management │ │ │ └── graph_beta │ │ │ └── managed_device │ │ │ ├── activate_device_esim │ │ │ └── tests │ │ │ │ └── responses │ │ │ │ └── validate_create │ │ │ │ └── post_activate_device_esim_success.json │ │ │ ├── clean_windows_device │ │ │ └── tests │ │ │ │ ├── responses │ │ │ │ └── validate_create │ │ │ │ │ └── post_clean_windows_device_success.json │ │ │ │ └── terraform │ │ │ │ └── unit │ │ │ │ └── action_minimal.tf │ │ │ └── bypass_activation_lock │ │ │ └── tests │ │ │ ├── responses │ │ │ └── validate_create │ │ │ │ └── post_bypass_activation_lock_success.json │ │ │ └── terraform │ │ │ └── unit │ │ │ └── action_minimal.tf │ └── common │ │ ├── shared_models │ │ └── graph_beta │ │ │ └── mime_content.go │ │ └── powershell │ │ └── resource_data.go ├── provider │ └── tests │ │ ├── terraform │ │ ├── unit │ │ │ └── provider_minimal.tf │ │ └── acceptance │ │ │ ├── provider_auth_method.tf │ │ │ ├── provider_cloud.tf │ │ │ ├── provider_client_secret.tf │ │ │ └── provider_proxy.tf │ │ └── responses │ │ └── auth_success.json ├── helpers │ └── misc.go └── utilities │ └── device_and_app_management │ └── installers │ └── macos_pkg │ └── xar │ └── utility.go ├── examples ├── data-sources │ └── microsoft365_graph_beta_device_management_device_enrollment_configuration │ │ └── datasource.tf ├── resources │ ├── microsoft365_graph_beta_device_management_windows_autopilot_device_identity │ │ ├── action_update_device_properties.tf │ │ └── import.sh │ ├── microsoft365_graph_beta_m365_admin_browser_site │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_policy_set │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_device_category │ │ ├── import.sh │ │ └── resource.tf │ ├── microsoft365_graph_beta_device_management_assignment_filter │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_role_scope_tag │ │ └── import.sh │ ├── microsoft365_graph_beta_m365_admin_browser_site_list │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_macos_pkg_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_macos_software_update_configuration │ │ └── import.sh │ ├── microsoft365_powershell_microsoft_teams_teams_calling_policy │ │ └── import.sh │ ├── microsoft365_powershell_microsoft_teams_teams_meeting_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_win_get_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_office_suite_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_autopatch_groups │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_macos_platform_script │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_role_definition │ │ └── import.sh │ ├── microsoft365_graph_device_and_app_management_role_definition │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_mobile_app_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_operation_approval_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_rbac_resource_operation │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_terms_and_conditions │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_application_category │ │ ├── import.sh │ │ └── resource.tf │ ├── microsoft365_graph_beta_device_and_app_management_macos_dmg_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_macos_lob_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_managed_device_cleanup_rule │ │ └── import.sh │ ├── microsoft365_graph_beta_windows_365_cloud_pc_user_setting │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_operation_approval_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_win32_app │ │ └── import.sh │ ├── microsoft365_graph_beta_groups_license_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_windows_365_cloud_pc_role_definition │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_endpoint_privilege_management_json │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_platform_script │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_ios_store_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_device_enrollment_configuration │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_device_compliance_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_remediation_script │ │ └── import.sh │ ├── microsoft365_graph_beta_windows_365_cloud_pc_organization_settings │ │ ├── import.sh │ │ └── resource.tf │ ├── microsoft365_graph_beta_windows_365_cloud_pc_provisioning_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_windows_web_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_role_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_autopilot_device_preparation_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_enrollment_status_page │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_quality_update_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_settings_catalog_template_json │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_terms_and_conditions_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_driver_update_profile │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_reuseable_policy_setting │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_driver_update_inventory │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_feature_update_profile │ │ └── import.sh │ ├── microsoft365_graph_m365_admin_m365_apps_installation_options │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_app_control_for_business_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_group_policy_uploaded_definition_files │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_update_ring │ │ └── import.sh │ ├── microsoft365_graph_beta_identity_and_access_named_location │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_autopilot_deployment_profile │ │ └── import.sh │ ├── microsoft365_graph_beta_windows_365_azure_network_connection │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_ios_device_compliance_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_quality_update_expedite_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_apple_configurator_enrollment_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_device_enrollment_notification │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_group_policy_text_value │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_intune_branding_profile │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_linux_device_compliance_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_linux_platform_script │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_macos_custom_attribute_script │ │ └── import.sh │ ├── microsoft365_graph_beta_identity_and_access_network_filtering_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_aosp_device_owner_compliance_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_app_control_for_business_built_in_controls │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_group_policy_boolean_value │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_group_policy_configuration │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_ios_ipados_web_clip │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_android_device_owner_compliance_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_group_policy_multi_text_value │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_settings_catalog_configuration_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_localized_notification_message │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_settings_catalog_configuration_policy_json │ │ └── import.sh │ ├── microsoft365_graph_beta_identity_and_access_authentication_strength_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_groups_group_member_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_macos_vpp_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_apple_user_initiated_enrollment_profile_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_ios_managed_device_app_configuration_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_identity_and_access_custom_security_attribute_definition │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_android_managed_device_app_configuration_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_windows_365_cloud_pc_alert_rule │ │ └── import.sh │ ├── microsoft365_graph_beta_groups_tenant_wide_group_settings │ │ └── import.sh │ ├── microsoft365_graph_beta_identity_and_access_authentication_context │ │ ├── import.sh │ │ └── resource.tf │ ├── microsoft365_graph_beta_windows_365_cloud_pc_device_image │ │ └── import.sh │ ├── microsoft365_graph_identity_and_access_conditional_access_terms_of_use │ │ └── import.sh │ ├── microsoft365_graph_beta_users_user_manager │ │ ├── import.sh │ │ └── resource_minimal.tf │ ├── microsoft365_graph_beta_identity_and_access_conditional_access_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_users_user_license_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_agents_agent_collection │ │ └── resource_minimal.tf │ ├── microsoft365_graph_beta_groups_group_settings │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_ios_managed_mobile_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_android_managed_mobile_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_windows_managed_mobile_app │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_backup_and_restore │ │ ├── resource.tf │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_linux_device_compliance_script │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_macos_device_compliance_policy │ │ └── import.sh │ ├── microsoft365_graph_beta_device_management_windows_device_compliance_script │ │ └── import.sh │ ├── microsoft365_graph_beta_device_and_app_management_mobile_app_supersedence │ │ └── import.sh │ ├── microsoft365_graph_beta_agents_agent_identity_blueprint_federated_identity_credential │ │ └── import.sh │ ├── microsoft365_graph_beta_users_user_mailbox_settings │ │ └── resource_minimal.tf │ ├── microsoft365_graph_device_management_device_configuration_assignment │ │ └── import.sh │ ├── microsoft365_graph_beta_agents_agent_instance │ │ └── import.sh │ ├── microsoft365_graph_beta_identity_and_access_attribute_set │ │ ├── import.sh │ │ └── resource.tf │ ├── microsoft365_graph_beta_agents_agent_collection_assignment │ │ └── resource_minimal.tf │ ├── microsoft365_graph_beta_agents_agent_identity_blueprint_identifier_uri │ │ └── import.sh │ └── microsoft365_graph_beta_applications_service_principal_app_role_assigned_to │ │ └── import.sh └── actions │ ├── graph_beta_device_management_windows_autopilot_device_identity_unassign_user_from_device │ └── action.tf │ └── graph_beta_device_management_windows_autopilot_device_identity_allow_next_enrollment │ └── action.tf ├── terraform-registry-manifest.json ├── scripts └── python │ └── requirements.txt ├── tools └── tools.go ├── SECURITY.md ├── .gitattributes └── dockerfile /internal/services/resources/files/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/files/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/m365_admin/graph_v1.0/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/education/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/education/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/extensions/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/extensions/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/financials/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/financials/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/security/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/backup_storage/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/backup_storage/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/industry_data_etl/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/industry_data_etl/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/sites_and_lists/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/sites_and_lists/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/external_data_connections/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/external_data_connections/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/teamwork_and_communications/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/teamwork_and_communications/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/people_and_workplace_intelligence/graph_beta/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/people_and_workplace_intelligence/graph_v1.0/_.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/macos_pkg_app_metadata/state.go: -------------------------------------------------------------------------------- 1 | package utilityMacOSPKGAppMetadata 2 | -------------------------------------------------------------------------------- /internal/provider/tests/terraform/unit/provider_minimal.tf: -------------------------------------------------------------------------------- 1 | provider "microsoft365" { 2 | auth_method = "device_code" 3 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/intune_branding_profile/resource_docs/patch_req_during_create.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/data-sources/microsoft365_graph_beta_device_management_device_enrollment_configuration/datasource.tf: -------------------------------------------------------------------------------- 1 | # TODO: Add example -------------------------------------------------------------------------------- /terraform-registry-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "metadata": { 4 | "protocol_versions": ["6.0"] 5 | } 6 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_autopilot_device_identity/action_update_device_properties.tf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint_password_credential/tests/responses/validate_delete/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint_password_credential/tests/responses/validate_read/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/services/resources/copilot/docs.md: -------------------------------------------------------------------------------- 1 | https://learn.microsoft.com/en-us/microsoft-365-copilot/extensibility/copilot-apis-overview -------------------------------------------------------------------------------- /scripts/python/requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | colorama 3 | azure-identity 4 | aiohttp 5 | msgraph-core 6 | msgraph-beta 7 | cryptography 8 | PyJWT -------------------------------------------------------------------------------- /internal/services/resources/_resource_template/resource_docs/resource_model.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.type": "#example", 3 | "id": "String (identifier)" 4 | } -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/targeted_managed_app_configuration/helpers.go: -------------------------------------------------------------------------------- 1 | package graphBetaTargetedManagedAppConfigurations 2 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint_service_principal/timeouts.go: -------------------------------------------------------------------------------- 1 | package graphBetaApplicationsAgentIdentityBlueprintServicePrincipal 2 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_strength_policy/tests/responses/validate_update/patch_authentication_strength_policy_success.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_driver_update_profile/tests/responses/validate_delete/delete_windows_driver_update_profile_success.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_enrollment_status_page/tests/responses/validate_assign/post_windows_enrollment_status_page_assign_success.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/testdata/invalid.txt: -------------------------------------------------------------------------------- 1 | This is not a valid MSI file. 2 | Just some text content for testing invalid format handling. 3 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_enrollment_notification/tests/responses/validate_assign/post_android_enrollment_notifications_assign_success.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_driver_update_profile/tests/responses/validate_assign/post_windows_driver_update_profile_assign_success.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/endpoint_privilege_management_json/resource_docs/research.md: -------------------------------------------------------------------------------- 1 | https://memv.ennbee.uk/posts/automate-endpoint-privilege-management/ -------------------------------------------------------------------------------- /tools/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | 3 | package tools 4 | 5 | import ( 6 | // Documentation generation 7 | _ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs" 8 | ) 9 | -------------------------------------------------------------------------------- /internal/provider/tests/terraform/acceptance/provider_auth_method.tf: -------------------------------------------------------------------------------- 1 | # Test provider with specific authentication method 2 | provider "microsoft365" { 3 | auth_method = "{{.AuthMethod}}" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/unit/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "all" { 2 | filter_type = "all" 3 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_m365_admin_browser_site/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_m365_admin_browser_site.example browser-site-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/acceptance/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "all" { 2 | filter_type = "all" 3 | } -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid user data" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "User not found" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_policy_set/import.sh: -------------------------------------------------------------------------------- 1 | # Import existing policy set 2 | terraform import microsoft365_graph_beta_device_management_policy_set.example {id} 3 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_instance/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_device_category/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_device_category.example device-category-id -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_assignment_filter/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_assignment_filter.example assignment-filter-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_role_scope_tag/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_role_scope_tag.example role-scope-tag-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_m365_admin_browser_site_list/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_m365_admin_browser_site_list.example browser-site-list-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_instance/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_user/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request body" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_user/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_macos_pkg_app/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_macos_pkg_app.example macos-pkg-app-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_macos_software_update_configuration/import.sh: -------------------------------------------------------------------------------- 1 | 2 | terraform import microsoft365_graph_beta_device_management_macos_software_update_configuration.example -------------------------------------------------------------------------------- /examples/resources/microsoft365_powershell_microsoft_teams_teams_calling_policy/import.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | terraform import microsoft365_powershell_microsoft_teams_teams_calling_policy.example ExampleCallingPolicy -------------------------------------------------------------------------------- /examples/resources/microsoft365_powershell_microsoft_teams_teams_meeting_policy/import.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | terraform import microsoft365_powershell_microsoft_teams_teams_meeting_policy.example ExampleMeetingPolicy -------------------------------------------------------------------------------- /internal/provider/tests/terraform/acceptance/provider_cloud.tf: -------------------------------------------------------------------------------- 1 | # Test provider with specific cloud environment 2 | provider "microsoft365" { 3 | cloud = "{{.Cloud}}" 4 | auth_method = "device_code" 5 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/unit/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "all" { 2 | filter_type = "all" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/itunes_app_metadata/tests/terraform/unit/datasource_empty.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_itunes_app_metadata" "empty" { 2 | search_term = "empty" 3 | country_code = "us" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/itunes_app_metadata/tests/terraform/unit/datasource_error.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_itunes_app_metadata" "error" { 2 | search_term = "error" 3 | country_code = "us" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/08_missing_input.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | # No input provided - should error 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_win_get_app/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_win_get_app.example win-get-app-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/acceptance/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "all" { 2 | filter_type = "all" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/itunes_app_metadata/tests/terraform/unit/datasource_firefox.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_itunes_app_metadata" "firefox" { 2 | search_term = "firefox" 3 | country_code = "us" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/itunes_app_metadata/tests/terraform/unit/datasource_office.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_itunes_app_metadata" "office" { 2 | search_term = "office" 3 | country_code = "gb" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_china.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "china" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_user/tests/responses/error_display_name_required.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "displayName is required" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_office_suite_app/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_office_suite_app.example office-suite-app-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_autopatch_groups/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_autopatch_groups.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_macos_platform_script/import.sh: -------------------------------------------------------------------------------- 1 | 2 | terraform import microsoft365_graph_beta_device_and_app_management_device_shell_script.example device-shell-script-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_role_definition/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_role_definition.example role-definition-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_device_and_app_management_role_definition/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_device_and_app_management_role_definition.example role-definition-id 3 | 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/unit/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "all" { 2 | filter_type = "all" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | If you discover a security issue in this repo, please submit it through the [GitHub Security Bug Bounty]() 4 | 5 | Thanks for helping make GitHub safe for everyone. -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_mobile_app_assignment/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_win_get_app.example win-get-app-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_operation_approval_policy/import.sh: -------------------------------------------------------------------------------- 1 | # Import existing resource operation 2 | terraform import microsoft365_graph_beta_device_management_operation_approval_policy {id} 3 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_rbac_resource_operation/import.sh: -------------------------------------------------------------------------------- 1 | # Import existing resource operation 2 | terraform import microsoft365_graph_beta_device_management_resource_operation.example {id} 3 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_terms_and_conditions/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_terms_and_conditions.example terms-and-conditions-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/acceptance/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "all" { 2 | filter_type = "all" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_usgov_dod.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "usgov-dod" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_worldwide.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/01_local_file.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/sample.msi" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/03_min_os_version.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/sample.msi" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/05_properties.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/sample.msi" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/06_architecture.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/sample.msi" 3 | } 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_application_category/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_application_category.example application-category-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_macos_dmg_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # {resource_id} 3 | terraform import microsoft365_graph_beta_device_and_app_management_macos_dmg_app.example macos-dmg-app-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_macos_lob_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # {resource_id} 3 | terraform import microsoft365_graph_beta_device_and_app_management_macos_lob_app.example_app macos-lob-app-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_managed_device_cleanup_rule/import.sh: -------------------------------------------------------------------------------- 1 | # Import existing cleanup rule 2 | terraform import microsoft365_graph_beta_device_management_managed_device_cleanup_rule.example {id} 3 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_cloud_pc_user_setting/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {user_id} 4 | terraform import microsoft365_graph_beta_windows_365_user_setting.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /internal/services/datasources/utility/itunes_app_metadata/tests/terraform/acceptance/datasource_firefox.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_itunes_app_metadata" "firefox" { 2 | search_term = "firefox" 3 | country_code = "us" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/acceptance/datasource_worldwide.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_usgov_gcchigh.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "usgov-gcchigh" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/02_url_source.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_url_source = "https://example.com/sample.msi" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/07_files_and_features.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/sample.msi" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/11_invalid_msi_format.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/invalid.txt" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint_service_principal/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_user/tests/responses/validate_read/get_sponsors_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directoryObjects", 3 | "value": [] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_operation_approval_policy/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_operation_approval_policy.example approval-policy-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_win32_app/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_win32_lob_app.example 00000000-0000-0000-0000-000000000000 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_groups_license_assignment/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using group object ID 3 | terraform import microsoft365_graph_beta_group_license_assignment.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_cloud_pc_role_definition/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_windows_365_cloud_pc_role_definition.example 00000000-0000-0000-0000-000000000000 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/itunes_app_metadata/tests/terraform/acceptance/datasource_teams.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_itunes_app_metadata" "teams" { 2 | search_term = "microsoft teams" 3 | country_code = "us" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/10_invalid_file_path.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/nonexistent.msi" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint_service_principal/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/reuseable_policy_settings/resource_docs/research.md: -------------------------------------------------------------------------------- 1 | https://learn.microsoft.com/en-us/graph/api/resources/intune-deviceconfigv2-devicemanagementreusablepolicysetting?view=graph-rest-beta -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/unit/07_neither_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Neither sid nor object_id provided (should fail) 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/itunes_app_metadata/tests/terraform/acceptance/datasource_office.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_itunes_app_metadata" "office" { 2 | search_term = "microsoft office" 3 | country_code = "us" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_endpoint_privilege_management_json/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_endpoint_privilege_management.example epm-policy-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_platform_script/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_windows_platform_script.example device-management-script-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/unit/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "all" { 2 | filter_type = "all" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/04_transform_paths.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/sample-with-transforms.msi" 3 | } 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_ios_store_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_and_app_management_ios_store_app.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_device_enrollment_configuration/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_device_enrollment_configuration.example device-enrollment-configuration-id -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_device_compliance_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | terraform import microsoft365_graph_beta_device_management_windows_device_compliance_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_remediation_script/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_windows_remediation_script.example windows-remediation-script-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_cloud_pc_organization_settings/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Import is not supported for this singleton resource. 3 | # There is only one instance per tenant and it cannot be imported into Terraform state. -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_cloud_pc_provisioning_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {user_id} 4 | terraform import microsoft365_graph_beta_windows_365_cloud_pc_provisioning_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/unit/02_by_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "by_id" { 2 | filter_type = "id" 3 | filter_value = "3b6f95b0-2064-4cc9-b5e5-1ab72af707b3" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/acceptance/01_all.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "all" { 2 | filter_type = "all" 3 | } 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/unit/05_invalid_guid_format.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Invalid GUID format 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | object_id = "not-a-valid-guid" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection/tests/responses/validate_list/list_agent_collections_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#agentRegistry/agentCollections", 3 | "value": [] 4 | } 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_windows_web_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_and_app_management_windows_web_app.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_role_assignment/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id/role_definition_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_role_assignment.example role-assignment-id/role-definition-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_autopilot_device_preparation_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | terraform import microsoft365_graph_beta_windows_autopilot_device_preparation_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_enrollment_status_page/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_windows_enrollment_status_page.example windows-enrollment-status-page-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_quality_update_policy/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_windows_quality_update_policy.example windows-update-policy-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/08_no_params_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: No search parameters provided (should fail) 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/responses/license/get_subscribed_skus_no_license.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#subscribedSkus", 3 | "value": [] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_settings_catalog_template_json/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_settings_catalog_template_json.example settings-catalog-template-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_terms_and_conditions_assignment/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_terms_and_conditions_assignment.example terms-and-conditions-assignment-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_driver_update_profile/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_windows_driver_update_profile.example windows-driver-update-profile-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/unit/03_by_app_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "by_app_id" { 2 | filter_type = "app_id" 3 | filter_value = "63e61dc2-f593-4a6f-92b9-92e4d2c03d4f" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/multitenant_management/graph_beta/audit_events/helpers.go: -------------------------------------------------------------------------------- 1 | package graphBetaAuditEvents 2 | 3 | // This file contains helper functions for the audit events datasource 4 | // Currently no helpers are needed but this maintains the pattern -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_expressroute.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | express_route = true 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_required_only.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | required_only = true 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/responses/validate_delete/get_ip_application_segment_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/responses/validate_error/error_resource_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy_assignment/tests/responses/validate_create/post_addgroup_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#Edm.Boolean", 3 | "value": true 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/attribute_set/tests/responses/validate_create/post_attribute_set.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directory/attributeSets/$entity", 3 | "id": "Engineering" 4 | } 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # .gitattributes snippet to force users to use same line endings for project. 2 | # 3 | # Handle line endings automatically for files detected as text 4 | # and leave all files detected as binary untouched. 5 | * text=auto 6 | 7 | *.json text eol=lf 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_reuseable_policy_setting/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_and_app_management_reuseable_policy_settings.example epm-reuseable-policy-id 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_driver_update_inventory/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_windows_driver_update_inventory.example windows-driver-update-inventory-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_feature_update_profile/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_windows_feature_update_profile.example windows-feature-update-profile-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_m365_admin_m365_apps_installation_options/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Singleton resource - no specific ID required 3 | terraform import microsoft365_graph_m365_admin_m365_apps_installation_options.example m365AppsInstallationOptions -------------------------------------------------------------------------------- /internal/services/actions/device_management/graph_beta/managed_device/activate_device_esim/tests/responses/validate_create/post_activate_device_esim_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#Edm.Null", 3 | "value": null 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/acceptance/02_by_display_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "by_display_name" { 2 | filter_type = "display_name" 3 | filter_value = "Microsoft Graph" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/acceptance/datasource_expressroute.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | express_route = true 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/acceptance/datasource_required_only.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | required_only = true 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_filter_optimize.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | categories = ["Optimize"] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy_assignment/tests/responses/validate_create/post_removegroup_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#Edm.Boolean", 3 | "value": true 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/named_location/tests/responses/validate_delete/get_named_location_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found", 5 | "details": [] 6 | } 7 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_app_control_for_business_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_management_app_control_for_business_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_group_policy_uploaded_definition_files/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_group_policy_uploaded_definition_files.example 976886d5-f758-4cd9-9c80-b30b7355bfcb 3 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_update_ring/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using group object ID 3 | terraform import microsoft365_graph_beta_device_management_windows_update_ring.example 00000000-0000-0000-0000-000000000000 4 | 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_named_location/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {id} 3 | terraform import microsoft365_graph_beta_identity_and_access_named_location.example 00000000-0000-0000-0000-000000000000 4 | 5 | -------------------------------------------------------------------------------- /internal/services/actions/device_management/graph_beta/managed_device/clean_windows_device/tests/responses/validate_create/post_clean_windows_device_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#Edm.Null", 3 | "value": null 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/unit/02_objectid_to_sid.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Convert Object ID to SID 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | object_id = "73d664e4-0886-4a73-b745-c694da45ddb4" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_filter_exchange.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | service_areas = ["Exchange"] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_scope_tag/resource_docs/model.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.type": "#microsoft.graph.roleScopeTag", 3 | "id": "String (identifier)", 4 | "displayName": "String", 5 | "description": "String", 6 | "isBuiltIn": true 7 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy_assignment/tests/responses/validate_error/error_no_policy_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#groupLifecyclePolicies", 3 | "value": [] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_autopilot_deployment_profile/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_windows_autopilot_deployment_profile.example windows-autopilot-deployment-profile-id 3 | 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_autopilot_device_identity/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_management_windows_autopilot_device_identity.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_azure_network_connection/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Replace RESOURCE_ID with the actual Azure Network Connection ID (GUID) 3 | terraform import microsoft365_graph_beta_windows_365_azure_network_connection.example RESOURCE_ID -------------------------------------------------------------------------------- /internal/services/actions/device_management/graph_beta/managed_device/bypass_activation_lock/tests/responses/validate_create/post_bypass_activation_lock_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#Edm.Null", 3 | "value": null 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/helpers.go: -------------------------------------------------------------------------------- 1 | package graphBetaServicePrincipal 2 | 3 | // This file contains helper functions for the service principal datasource 4 | // Currently no helper functions are needed, but this file follows the template structure -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/unit/04_by_display_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "by_display_name" { 2 | filter_type = "display_name" 3 | filter_value = "Microsoft Intune SCCM Connector" 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/unit/02_by_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "by_id" { 2 | filter_type = "id" 3 | filter_value = "00000000-0000-0000-0000-000000000001" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/macos_pkg_app_metadata/tests/terraform/unit/02_invalid_url.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Invalid URL format (should fail validation) 2 | data "microsoft365_utility_macos_pkg_app_metadata" "test" { 3 | installer_url_source = "not-a-valid-url" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/macos_pkg_app_metadata/tests/terraform/unit/04_neither_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Neither installer_file_path_source nor installer_url_source provided (should fail) 2 | data "microsoft365_utility_macos_pkg_app_metadata" "test" { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/service_principal_app_role_assigned_to/tests/responses/validate_delete/get_app_role_assignment_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/linux_platform_script/resource_docs/group_assignment_model.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.type": "#microsoft.graph.deviceManagementScriptGroupAssignment", 3 | "id": "String (identifier)", 4 | "targetGroupId": "String" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_context/tests/terraform/acceptance/04_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_authentication_context" "test" { 2 | id = "c93" 3 | display_name = "Minimal Context" 4 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_ios_device_compliance_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import using the resource ID 4 | terraform import microsoft365_graph_beta_device_management_ios_device_compliance_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_quality_update_expedite_policy/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_and_app_management_windows_quality_update_expedite_policy.example windows-update-expedite-policy-id 3 | 4 | -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/acceptance/02_by_device_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "by_device_name" { 2 | filter_type = "device_name" 3 | filter_value = "DESKTOP" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/unit/03_by_device_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "by_device_name" { 2 | filter_type = "device_name" 3 | filter_value = "DESKTOP-WIN-001" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/unit/04_by_serial_number.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "by_serial_number" { 2 | filter_type = "serial_number" 3 | filter_value = "SN-WIN-001" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/unit/01_sid_to_objectid.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Convert SID to Object ID 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | sid = "S-1-12-1-1943430372-1249052806-2496021943-3034400218" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/02_search_by_string_id.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Search for product by string ID 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | string_id = "ENTERPRISEPACK" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/09_invalid_guid_format.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Invalid GUID format (should fail) 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | guid = "not-a-valid-guid" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_apple_configurator_enrollment_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_management_apple_configurator_enrollment_policy.example 00000000-0000-0000-0000-000000000000 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_device_enrollment_notification/import.sh: -------------------------------------------------------------------------------- 1 | # {resource_id} 2 | terraform import microsoft365_graph_beta_device_management_device_enrollment_notification.example 00000000-0000-0000-0000-000000000000_EnrollmentNotificationsConfiguration -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_group_policy_text_value/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using the group policy text value ID 3 | terraform import microsoft365_graph_beta_device_management_group_policy_text_value.example 00000000-0000-0000-0000-000000000000 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_intune_branding_profile/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using the IntuneBrandingProfile ID 3 | terraform import microsoft365_graph_beta_device_management_intune_branding_profile.example 00000000-0000-0000-0000-000000000000 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_linux_device_compliance_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import using the resource ID 4 | terraform import microsoft365_graph_beta_device_management_linux_device_compliance_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_linux_platform_script/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using the LinuxPlatformScript ID 3 | terraform import microsoft365_graph_beta_device_management_linux_platform_script.example 00000000-0000-0000-0000-000000000000 4 | 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_macos_custom_attribute_script/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # {custom_attribute_script_id} 3 | terraform import microsoft365_graph_beta_device_management_device_macos_custom_attribute_script.example 00000000-0000-0000-0000-000000000001 -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/unit/05_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "complianceState eq 'compliant'" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/unit/02_by_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "by_id" { 2 | filter_type = "id" 3 | filter_value = "62e90394-69f5-4237-9190-012177145e10" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/unit/04_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "isPrivileged eq true" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/acceptance/02_objectid_to_sid.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Convert Object ID to SID 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | object_id = "73d664e4-0886-4a73-b745-c694da45ddb4" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/acceptance/03_max_uint32.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Maximum uint32 values 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | sid = "S-1-12-1-4294967295-4294967295-4294967295-4294967295" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/01_search_by_product_name.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Search for products by name 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | product_name = "Microsoft 365 E3" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/03_search_by_guid.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Search for product by GUID 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | guid = "6fd2c87f-b296-42f0-b197-1e91e994b900" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/05_search_by_service_plan_id.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Search for service plans by ID 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | service_plan_id = "EXCHANGE" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/app_control_for_business_built_in_controls/tests/responses/validate_delete/get_app_control_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found", 5 | "details": [] 6 | } 7 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_strength_policy/tests/responses/validate_delete/get_authentication_strength_policy_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found" 5 | } 6 | } -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user/tests/terraform/unit/resource_invalid.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_users_user" "invalid" { 2 | display_name = "Invalid User" 3 | account_enabled = true 4 | # Missing required user_principal_name and password_profile 5 | } 6 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user_manager/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_users_user_manager" "test" { 2 | user_id = "00000000-0000-0000-0000-000000000001" 3 | manager_id = "00000000-0000-0000-0000-000000000002" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_network_filtering_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {id} 3 | terraform import microsoft365_graph_beta_identity_and_access_network_filtering_policy.example 00000000-0000-0000-0000-000000000000 4 | 5 | -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/acceptance/03_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "operatingSystem eq 'Windows'" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/acceptance/04_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "isPrivileged eq true" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/acceptance/datasource_firefox_msi.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "firefox" { 2 | installer_url_source = "https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64&lang=en-US" 3 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_msi_app_metadata/tests/terraform/unit/09_both_inputs.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_msi_app_metadata" "test" { 2 | installer_file_path_source = "testdata/sample.msi" 3 | installer_url_source = "https://example.com/sample.msi" 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/app_control_for_business_built_in_controls/tests/responses/validate_assign/post_app_control_assign_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid assignment data", 5 | "details": [] 6 | } 7 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy_assignment/tests/terraform/unit/resource_basic.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy_assignment" "test" { 2 | group_id = "11111111-1111-1111-1111-111111111111" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_aosp_device_owner_compliance_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import using the resource ID 4 | terraform import microsoft365_graph_beta_device_management_aosp_device_owner_compliance_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_app_control_for_business_built_in_controls/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_management_app_control_for_business_built_in_controls.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_group_policy_boolean_value/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using the group policy boolean value ID 3 | terraform import microsoft365_graph_beta_device_management_group_policy_boolean_value.example 00000000-0000-0000-0000-000000000000 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_group_policy_configuration/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using the group policy configuration ID 3 | terraform import microsoft365_graph_beta_device_management_group_policy_configuration.example 00000000-0000-0000-0000-000000000000 4 | -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/acceptance/07_odata_search_only.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "odata_search_only" { 2 | filter_type = "odata" 3 | odata_search = "\"displayName:Intune\"" 4 | odata_count = true 5 | } -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/helpers.go: -------------------------------------------------------------------------------- 1 | package graphBetaRoleDefinitions 2 | 3 | // This file contains helper functions for the role definitions datasource 4 | // Currently no helper functions are needed, but this file follows the template structure 5 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/unit/03_by_display_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "by_display_name" { 2 | filter_type = "display_name" 3 | filter_value = "Global Administrator" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/acceptance/01_sid_to_objectid.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Convert SID to Object ID 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | sid = "S-1-12-1-1943430372-1249052806-2496021943-3034400218" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/acceptance/01_search_by_product_name.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Search for products by name 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | product_name = "Microsoft 365 E3" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/unit/04_neither_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Neither package_identifier nor search_term provided (should fail) 2 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 3 | } 4 | 5 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/application_category/resource_docs/resource_model.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.type": "#microsoft.graph.mobileAppCategory", 3 | "id": "String (identifier)", 4 | "displayName": "String", 5 | "lastModifiedDateTime": "String (timestamp)" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/app_control_for_business_built_in_controls/tests/responses/validate_create/post_app_control_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid App Control for Business data", 5 | "details": [] 6 | } 7 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/app_control_for_business_policy/tests/responses/validate_get/get_policy_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/configurationPolicies", 3 | "@odata.count": 0, 4 | "value": [] 5 | } 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_ios_ipados_web_clip/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} - The ID of the iOS Web Clip resource 4 | terraform import microsoft365_graph_beta_device_and_app_management_ios_ipados_web_clip.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_android_device_owner_compliance_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import using the resource ID 4 | terraform import microsoft365_graph_beta_device_management_android_device_owner_compliance_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_group_policy_multi_text_value/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using the group policy text value ID 3 | terraform import microsoft365_graph_beta_device_management_group_policy_multi_text_value.example 00000000-0000-0000-0000-000000000000 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_settings_catalog_configuration_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_and_app_management_settings_catalog_configuartion_policy.example 00000000-0000-0000-0000-000000000000 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/acceptance/03_by_app_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "by_app_id" { 2 | filter_type = "app_id" 3 | filter_value = "00000003-0000-0000-c000-000000000000" // Microsoft Graph PowerShell 4 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/unit/03_invalid_rid_exceeds_max.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Invalid RID exceeds uint32 maximum 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | sid = "S-1-12-1-1234567890-9876543210-1111111111-2222222222" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/04_search_by_service_plan_name.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Search for service plans by name 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | service_plan_name = "Exchange Online" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/macos_pkg_app_metadata/tests/terraform/unit/01_invalid_file_extension.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Invalid file extension (should fail validation) 2 | data "microsoft365_utility_macos_pkg_app_metadata" "test" { 3 | installer_file_path_source = "/path/to/app.dmg" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection_assignment/tests/responses/validate_read/list_members_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#agentRegistry/agentCollections('22222222-2222-2222-2222-222222222222')/members", 3 | "value": [] 4 | } 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_localized_notification_message/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using the localized notification message ID 3 | terraform import microsoft365_graph_beta_device_management_localized_notification_message.example "12345678-1234-1234-1234-123456789012" -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_settings_catalog_configuration_policy_json/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_management_settings_catalog_configuration_policy_json.example 00000000-0000-0000-0000-000000000000 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_authentication_strength_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {id} 3 | terraform import microsoft365_graph_beta_identity_and_access_authentication_strength_policy.example 00000000-0000-0000-0000-000000000000 4 | 5 | -------------------------------------------------------------------------------- /internal/services/actions/device_management/graph_beta/managed_device/bypass_activation_lock/tests/terraform/unit/action_minimal.tf: -------------------------------------------------------------------------------- 1 | action "graph_beta_device_management_managed_device_bypass_activation_lock" "test_minimal" { 2 | device_ids = [ 3 | "12345678-1234-1234-1234-123456789abc", 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/acceptance/03_by_display_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "by_display_name" { 2 | filter_type = "display_name" 3 | filter_value = "Security Administrator" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/acceptance/datasource_teams_media.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | service_areas = ["Skype"] 4 | categories = ["Optimize"] 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/app_control_for_business_built_in_controls/tests/responses/validate_get/get_app_control_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/configurationPolicies", 3 | "@odata.count": 0, 4 | "value": [] 5 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_platform_script/tests/responses/validate_get/get_windows_platform_scripts_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceManagementScripts", 3 | "@odata.count": 0, 4 | "value": [] 5 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/license_assignment/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_license_assignment" "minimal" { 2 | group_id = "00000000-0000-0000-0000-000000000002" 3 | sku_id = "f30db892-07e9-47e9-837c-80727f46fd3d" # FLOW_FREE 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_context/tests/responses/validate_create/get_authentication_contexts_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/conditionalAccess/authenticationContextClassReferences", 3 | "value": [] 4 | } -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/license_assignment/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_users_user_license_assignment" "minimal" { 2 | user_id = "00000000-0000-0000-0000-000000000002" 3 | sku_id = "f30db892-07e9-47e9-837c-80727f46fd3d" # FLOW_FREE 4 | } 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_groups_group_member_assignment/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {group_id}/{member_id} 3 | terraform import microsoft365_graph_beta_groups_group_member_assignment.example "1132b215-826f-42a9-8cfe-1643d19d17fd/2243c326-937g-53f0-c9df-2e68f106b901" -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/unit/02_by_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "by_id" { 2 | filter_type = "id" 3 | filter_value = "3a6307ef-6991-faf1-01e1-35e1557287aa" 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/unit/03_by_product_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "by_product_name" { 2 | filter_type = "product_name" 3 | filter_value = "7-Zip" 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/acceptance/02_by_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "by_id" { 2 | filter_type = "id" 3 | filter_value = "62e90394-69f5-4237-9190-012177145e10" # Global Administrator 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/multitenant_management/graph_beta/aggregated_policy_compliances/helpers.go: -------------------------------------------------------------------------------- 1 | package graphBetaAggregatedPolicyCompliances 2 | 3 | // This file contains helper functions for the aggregated policy compliances datasource 4 | // Currently no helpers are needed but this maintains the pattern -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/acceptance/04_multiple_results.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Search that returns multiple results 2 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 3 | search_term = "Microsoft" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/responses/validate_create/get_device_category_minimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "12345678-1234-1234-1234-123456789012", 3 | "displayName": "Test Minimal Device Category - Unique", 4 | "description": null, 5 | "roleScopeTagIds": ["0"] 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/responses/validate_error/error_duplicate_platform.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "InternalServerError", 4 | "message": "A cleanup rule already exists for the specified platform type" 5 | } 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/responses/validate_update/get_filtering_policy_updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#filteringPolicies/$entity", 3 | "lastModifiedDateTime": "2024-01-02T00:00:00Z" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_macos_vpp_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {app_id} - Replace with the actual MacOS VPP App ID from Microsoft Intune 4 | terraform import microsoft365_graph_beta_device_and_app_management_macos_vpp_app.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_apple_user_initiated_enrollment_profile_assignment/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {resource_id} 4 | terraform import microsoft365_graph_beta_device_management_apple_user_initiated_enrollment_profile_assignment.example 00000000-0000-0000-0000-000000000000 5 | -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/unit/06_odata_advanced.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "odata_advanced" { 2 | filter_type = "odata" 3 | odata_select = "appId,displayName,publisherName" 4 | odata_top = 10 5 | odata_skip = 0 6 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/acceptance/02_by_id.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "by_id" { 2 | filter_type = "id" 3 | filter_value = "3a6307ef-6991-faf1-01e1-35e1557287aa" 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/acceptance/03_by_product_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "by_product_name" { 2 | filter_type = "product_name" 3 | filter_value = "7-Zip" 4 | } 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_ios_managed_device_app_configuration_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using ID format: {id} 3 | terraform import microsoft365_graph_beta_device_and_app_management_ios_managed_device_app_configuration_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_custom_security_attribute_definition/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import ID format: {attribute_set}/{name} 3 | terraform import microsoft365_graph_beta_identity_and_access_custom_security_attribute_definition.example "Engineering/ExampleCustomAttribute" 4 | 5 | -------------------------------------------------------------------------------- /internal/helpers/misc.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "os" 5 | "strings" 6 | ) 7 | 8 | // IsDebugMode checks if the M365_DEBUG_MODE environment variable is set to true 9 | func IsDebugMode() bool { 10 | debugMode := os.Getenv("M365_DEBUG_MODE") 11 | return strings.ToLower(debugMode) == "true" 12 | } 13 | -------------------------------------------------------------------------------- /internal/provider/tests/responses/auth_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1jN2wzSXo5M2c3dHdoYVNuT2hqZXJZVm1sUSJ9.mock_token_payload", 3 | "token_type": "Bearer", 4 | "expires_in": 3600, 5 | "ext_expires_in": 3600, 6 | "scope": "https://graph.microsoft.com/.default" 7 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/unit/04_by_publisher_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "by_publisher_name" { 2 | filter_type = "publisher_name" 3 | filter_value = "Igor Pavlov" 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/unit/04_invalid_sid_format.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Invalid SID format (on-prem AD SID instead of Entra ID SID) 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | sid = "S-1-5-21-1234567890-1234567891-1234567892-1234567893" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/acceptance/02_search_by_string_id.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Search for product by string ID 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | string_id = "SPE_E3_RPA1" # Microsoft 365 E3 (no Teams) 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/06_search_by_service_plan_guid.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Search for service plan by GUID 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | service_plan_guid = "113feb6c-3fe4-4440-bddc-54d774bf0318" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/acceptance/datasource_filter_exchange_optimize.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | service_areas = ["Exchange"] 4 | categories = ["Optimize"] 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/assignment_filter/tests/responses/validate_create/post_assignment_filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "00000000-0000-0000-0000-000000000001", 3 | "createdDateTime": "2024-01-01T00:00:00Z", 4 | "lastModifiedDateTime": "2024-01-01T00:00:00Z", 5 | "roleScopeTags": ["0"] 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_device_compliance_script/tests/responses/validate_get/get_windows_device_compliance_scripts_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceComplianceScripts", 3 | "@odata.count": 0, 4 | "value": [] 5 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/acceptance/04_by_publisher_name.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "by_publisher_name" { 2 | filter_type = "publisher_name" 3 | filter_value = "Microsoft" 4 | } 5 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/assignment_filter/tests/responses/validate_update/get_assignment_filter_updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "00000000-0000-0000-0000-000000000003", 3 | "createdDateTime": "2024-01-01T00:00:00Z", 4 | "lastModifiedDateTime": "2024-01-01T12:00:00Z", 5 | "roleScopeTags": ["0"] 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/responses/validate_update/get_device_category_updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "12345678-1234-1234-1234-123456789012", 3 | "displayName": "Test Device Category - Updated", 4 | "description": "Updated description", 5 | "roleScopeTagIds": ["0", "1"] 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_device_compliance_policy/tests/responses/validate_get/get_windows_device_compliance_policies_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCompliancePolicies", 3 | "@odata.count": 1, 4 | "value": [] 5 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_enrollment_status_page/tests/responses/validate_get/get_windows_enrollment_status_pages_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceEnrollmentConfigurations", 3 | "@odata.count": 0, 4 | "value": [] 5 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_android_managed_device_app_configuration_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using ID format: {id} 3 | terraform import microsoft365_graph_beta_device_and_app_management_android_managed_device_app_configuration_policy.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_cloud_pc_alert_rule/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Replace with the actual ID of your Cloud PC alert rule (visible after creation in the Azure portal or via API) 4 | terraform import microsoft365_graph_beta_windows_365_cloud_pc_alert_rule.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_strength_policy/tests/responses/validate_create/get_authentication_strength_policies_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/conditionalAccess/authenticationStrength/policies", 3 | "value": [] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_groups_tenant_wide_group_settings/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import a tenant-wide directory setting 4 | # Replace {setting_id} with the actual setting ID 5 | 6 | terraform import microsoft365_graph_beta_groups_tenant_wide_group_settings.unified_settings 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_authentication_context/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {id} 3 | # note the id for this resource is formatted as c{number} between 8 and 99 4 | terraform import microsoft365_graph_beta_identity_and_access_authentication_context.example c8 5 | 6 | -------------------------------------------------------------------------------- /internal/provider/tests/terraform/acceptance/provider_client_secret.tf: -------------------------------------------------------------------------------- 1 | # Test provider with client secret authentication 2 | provider "microsoft365" { 3 | auth_method = "client_secret" 4 | 5 | entra_id_options = { 6 | client_id = "00000000-0000-0000-0000-000000000001" 7 | client_secret = "test-client-secret" 8 | } 9 | } -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/acceptance/04_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "startsWith(displayName,'Microsoft')" 4 | odata_count = true 5 | odata_orderby = "displayName" 6 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/acceptance/03_search_by_service_plan.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Search for service plans and find which products include them 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | service_plan_name = "Exchange Online" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/responses/validate_create/post_filtering_policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "00000000-0000-0000-0000-000000000001", 3 | "createdDateTime": "2024-01-01T00:00:00Z", 4 | "lastModifiedDateTime": "2024-01-01T00:00:00Z", 5 | "version": "1.0.0" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_cloud_pc_device_image/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Replace with the actual ID of your Cloud PC device image (visible after creation in the Azure portal or via API) 4 | terraform import microsoft365_graph_beta_windows_365_cloud_pc_device_image.example 00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_identity_and_access_conditional_access_terms_of_use/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | terraform import microsoft365_graph_identity_and_access_conditional_access_terms_of_use.example 00000000-0000-0000-0000-000000000000 4 | # where 00000000-0000-0000-0000-000000000000 is the Conditional Access Terms of Use ID -------------------------------------------------------------------------------- /internal/services/datasources/utility/macos_pkg_app_metadata/tests/terraform/unit/06_valid_url.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Valid URL format (validates regex, will fail when trying to download from fake URL) 2 | data "microsoft365_utility_macos_pkg_app_metadata" "test" { 3 | installer_url_source = "https://nonexistent.example.com/app.pkg" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection_assignment/resource_acceptance_test.go: -------------------------------------------------------------------------------- 1 | package graphBetaAgentsAgentCollectionAssignment 2 | 3 | // This resource has a dependancy upon the agent_collection resource. 4 | // which currently does not support delete. 5 | // so skipping on acc tests until i can delete the dependency. 6 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_quality_update_policy/tests/terraform/acceptance/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_windows_quality_update_policy" "test" { 2 | display_name = "Acceptance - Windows Quality Update Policy" 3 | hotpatch_enabled = false 4 | } 5 | 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/terraform/unit/resource_updated.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_network_filtering_policy" "test" { 2 | name = "Updated Filtering Policy" 3 | description = "Updated description" 4 | action = "allow" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user_mailbox_settings/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_users_user_mailbox_settings" "minimal" { 2 | user_id = "00000000-0000-0000-0000-000000000001" 3 | time_zone = "UTC" 4 | date_format = "MM/dd/yyyy" 5 | time_format = "hh:mm tt" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_authentication_context/resource.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_authentication_context" "example" { 2 | id = "c8" 3 | display_name = "Example Authentication Context" 4 | description = "Example authentication context" 5 | is_available = true 6 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_relationship/helpers.go: -------------------------------------------------------------------------------- 1 | package graphBetaMobileAppRelationship 2 | 3 | // This file can contain helper functions specific to the mobile_app_relationship data source 4 | // Currently no helpers are needed, but this file is created for consistency with other data sources 5 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/licensing_service_plan_reference/tests/terraform/unit/07_multiple_params_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Multiple search parameters provided (should fail) 2 | data "microsoft365_utility_licensing_service_plan_reference" "test" { 3 | product_name = "Microsoft 365 E3" 4 | string_id = "ENTERPRISEPACK" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/macos_pkg_app_metadata/tests/terraform/unit/05_valid_file_path.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Valid file path format (validates regex, will fail when trying to read non-existent file) 2 | data "microsoft365_utility_macos_pkg_app_metadata" "test" { 3 | installer_file_path_source = "/path/to/nonexistent/app.pkg" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection_assignment/tests/responses/validate_create/post_assignment_minimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.type": "#microsoft.graph.agentInstance", 3 | "id": "11111111-1111-1111-1111-111111111111", 4 | "displayName": "Test Agent Instance", 5 | "originatingStore": "Microsoft Security Copilot" 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_scope_tag/tests/responses/validate_update/get_role_scope_tag_updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "87654321-4321-4321-4321-210987654321", 3 | "displayName": "unit-test-role-scope-tag-maximal-ABC12345", 4 | "description": "unit-test-role-scope-tag-maximal-ABC12345", 5 | "isBuiltIn": false 6 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_owner_assignment/mocks/terraform/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_owner_assignment" "minimal" { 2 | group_id = "00000000-0000-0000-0000-000000000002" 3 | owner_id = "00000000-0000-0000-0000-000000000004" 4 | owner_object_type = "User" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/named_location/tests/terraform/unit/resource_ip_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_named_location" "ip_minimal" { 2 | display_name = "unit-test-ip-named-location-minimal" 3 | is_trusted = false 4 | 5 | ipv4_ranges = [ 6 | "192.168.1.0/24" 7 | ] 8 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_users_user_manager/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import an existing user manager relationship into Terraform 4 | # The import ID is the user_id (the user whose manager is being managed) 5 | 6 | terraform import microsoft365_graph_beta_users_user_manager.example 00000000-0000-0000-0000-000000000000 7 | 8 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_365_endpoint_reference/tests/terraform/unit/datasource_multiple_filters.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_microsoft_365_endpoint_reference" "test" { 2 | instance = "worldwide" 3 | service_areas = ["Exchange", "Skype"] 4 | categories = ["Optimize", "Allow"] 5 | required_only = true 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_member_assignment/mocks/terraform/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_member_assignment" "maximal" { 2 | group_id = "00000000-0000-0000-0000-000000000003" 3 | member_id = "00000000-0000-0000-0000-000000000005" 4 | member_object_type = "Group" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_member_assignment/mocks/terraform/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_member_assignment" "minimal" { 2 | group_id = "00000000-0000-0000-0000-000000000002" 3 | member_id = "00000000-0000-0000-0000-000000000004" 4 | member_object_type = "User" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user_manager/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request", 5 | "innerError": { 6 | "date": "2023-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000" 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_conditional_access_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {policy_id}/{condition_id} 3 | terraform import microsoft365_graph_beta_identity_and_access_conditional_access_policy.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 4 | 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_users_user_license_assignment/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import format: {user_id}_{sku_id} 3 | 4 | # Import using user object ID and license SKU ID 5 | terraform import microsoft365_graph_beta_users_user_license_assignment.example "12345678-1234-1234-1234-123456789012_6fd2c87f-b296-42f0-b197-1e91e994b900" 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/responses/validate_update/patch_managed_device_cleanup_rule_minimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "displayName": "Test Minimal Managed Device Cleanup Rule - Unique", 3 | "deviceCleanupRulePlatformType": "windows", 4 | "deviceInactivityBeforeRetirementInDays": 30 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/unit/resource_all.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "all" { 2 | group_lifetime_in_days = 180 3 | managed_group_types = "All" 4 | alternate_notification_emails = "admin@deploymenttheory.com" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_owner_assignment/mocks/terraform/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_owner_assignment" "maximal" { 2 | group_id = "00000000-0000-0000-0000-000000000003" 3 | owner_id = "00000000-0000-0000-0000-000000000005" 4 | owner_object_type = "ServicePrincipal" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/attribute_set/resource_docs/create.md: -------------------------------------------------------------------------------- 1 | Request URL 2 | https://graph.microsoft.com/beta/directory/attributeSets 3 | Request Method 4 | POST 5 | 6 | {"id":"name","description":"thing","maxAttributesPerSet":25} 7 | 8 | https://learn.microsoft.com/en-us/graph/api/resources/attributeset?view=graph-rest-beta -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/attribute_set/tests/terraform/unit/test_config_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_attribute_set" "test" { 2 | id = "Marketing" 3 | 4 | timeouts = { 5 | create = "30m" 6 | read = "10m" 7 | update = "30m" 8 | delete = "30m" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_context/tests/terraform/acceptance/03_import.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_authentication_context" "test" { 2 | id = "c92" 3 | display_name = "Import Test Context" 4 | description = "Context for import testing" 5 | is_available = true 6 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/terraform/unit/resource_invalid.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_network_filtering_policy" "test" { 2 | name = "Test Filtering Policy" 3 | description = "Test filtering policy with invalid action" 4 | action = "invalid_action" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_network_filtering_policy" "test" { 2 | name = "Test Filtering Policy" 3 | description = "Test filtering policy for unit testing" 4 | action = "block" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user_mailbox_settings/tests/responses/mailbox_settings_minimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('00000000-0000-0000-0000-000000000001')/mailboxSettings", 3 | "timeZone": "UTC", 4 | "dateFormat": "MM/dd/yyyy", 5 | "timeFormat": "hh:mm tt" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user_manager/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found", 5 | "innerError": { 6 | "date": "2023-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000" 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/acceptance/06_odata_comprehensive.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "odata_comprehensive" { 2 | filter_type = "odata" 3 | odata_filter = "isBuiltIn eq true" 4 | odata_count = true 5 | odata_orderby = "displayName" 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/unit/02_search_term.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Search for packages by search term 2 | # Using "PC Manager" which returns Microsoft PC Manager package 3 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 4 | search_term = "PC Manager" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/acceptance/resource_all.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "all" { 2 | group_lifetime_in_days = 180 3 | managed_group_types = "All" 4 | alternate_notification_emails = "admin@deploymenttheory.com" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/custom_security_attribute_allowed_value/tests/responses/post_allowed_value.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directory/customSecurityAttributeDefinitions('Engineering_Project')/allowedValues/$entity", 3 | "id": "Alpine", 4 | "isActive": true 5 | } 6 | 7 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_application_category/resource.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_and_app_management_application_category" "example" { 2 | display_name = "Business Apps" 3 | 4 | timeouts = { 5 | create = "10s" 6 | read = "10s" 7 | update = "10s" 8 | delete = "10s" 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/acceptance/05_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "startswith(publisherDisplayName, 'Microsoft')" 4 | odata_top = 10 5 | } 6 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/unit/06_both_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Both sid and object_id provided (should fail) 2 | data "microsoft365_utility_entra_id_sid_converter" "test" { 3 | sid = "S-1-12-1-1943430372-1249052806-2496021943-3034400218" 4 | object_id = "73d664e4-0886-4a73-b745-c694da45ddb4" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | # Minimal Agent Collection configuration for unit testing 2 | resource "microsoft365_graph_beta_agents_agent_collection" "test_minimal" { 3 | display_name = "Unit Test Agent Collection Minimal" 4 | owner_ids = ["11111111-1111-1111-1111-111111111111"] 5 | } 6 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection/tests/terraform/unit/resource_update_minimal.tf: -------------------------------------------------------------------------------- 1 | # Minimal configuration for update testing 2 | resource "microsoft365_graph_beta_agents_agent_collection" "test_update" { 3 | display_name = "Unit Test Agent Collection Update Minimal" 4 | owner_ids = ["11111111-1111-1111-1111-111111111111"] 5 | } 6 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/responses/validate_get/get_ip_application_segment_minimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "11111111-1111-1111-1111-111111111111", 3 | "destinationHost": "192.168.1.100", 4 | "destinationType": "ipAddress", 5 | "ports": [ 6 | "80-80" 7 | ], 8 | "protocol": "tcp" 9 | } 10 | 11 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/responses/validate_create/get_device_category_maximal.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "87654321-4321-4321-4321-210987654321", 3 | "displayName": "Test Maximal Device Category - Unique", 4 | "description": "Maximal device category for testing with all features", 5 | "roleScopeTagIds": ["0", "1"] 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/resource_missing_display_name.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "test" { 2 | device_cleanup_rule_platform_type = "windows" 3 | device_inactivity_before_retirement_in_days = 60 4 | } 5 | 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/rbac_resource_operation/resource_docs/resource.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.type": "#microsoft.graph.resourceOperation", 3 | "id": "String (identifier)", 4 | "resource": "String", 5 | "resourceName": "String", 6 | "actionName": "String", 7 | "description": "String", 8 | "enabledForScopeValidation": true 9 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/acceptance/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "minimal" { 2 | group_lifetime_in_days = 180 3 | managed_group_types = "All" 4 | alternate_notification_emails = "admin@deploymenttheory.com" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/unit/resource_none.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "none" { 2 | group_lifetime_in_days = 365 3 | managed_group_types = "None" 4 | alternate_notification_emails = "admin@deploymenttheory.com" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/attribute_set/tests/responses/validate_update/get_attribute_set_updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directory/attributeSets/$entity", 3 | "id": "Engineering", 4 | "description": "Updated attributes for engineering team", 5 | "maxAttributesPerSet": 50 6 | } 7 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_agents_agent_collection/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | # Minimal Agent Collection configuration 2 | # Creates an agent collection with required fields only 3 | resource "microsoft365_graph_beta_agents_agent_collection" "minimal" { 4 | display_name = "My Agent Collection" 5 | owner_ids = ["00000000-0000-0000-0000-000000000000"] 6 | } 7 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_groups_group_settings/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import a group-specific directory setting 4 | # Format: {group_id}/{setting_id} 5 | # Replace {group_id} with the actual group ID and {setting_id} with the setting ID 6 | 7 | terraform import microsoft365_graph_beta_groups_group_settings.guest_settings "{group_id}/{setting_id}" -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/unit/07_odata_comprehensive.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "odata_comprehensive" { 2 | filter_type = "odata" 3 | odata_filter = "operatingSystem eq 'Windows'" 4 | odata_top = 50 5 | odata_orderby = "lastSyncDateTime desc" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/acceptance/02_search_term.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Search for packages by search term 2 | # Using "PC Manager" which returns Microsoft PC Manager package 3 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 4 | search_term = "PC Manager" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity/tests/responses/validate_read/get_sponsors_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directoryObjects", 3 | "value": [ 4 | { 5 | "@odata.type": "#microsoft.graph.user", 6 | "id": "22222222-2222-2222-2222-222222222222" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/responses/validate_update/patch_ip_application_segment_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "33333333-3333-3333-3333-333333333333", 3 | "destinationHost": "192.168.1.200", 4 | "destinationType": "ipAddress", 5 | "ports": [ 6 | "443-443" 7 | ], 8 | "protocol": "tcp" 9 | } 10 | 11 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/acceptance/resource_none.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "none" { 2 | group_lifetime_in_days = 365 3 | managed_group_types = "None" 4 | alternate_notification_emails = "admin@deploymenttheory.com" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/custom_security_attribute_allowed_value/tests/responses/get_allowed_value_updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directory/customSecurityAttributeDefinitions('Engineering_Project')/allowedValues/$entity", 3 | "id": "Alpine", 4 | "isActive": false 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/named_location/tests/terraform/unit/resource_ip_ipv6_only.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_named_location" "ip_ipv6_only" { 2 | display_name = "unit-test-ip-named-location-ipv6-only" 3 | is_trusted = true 4 | 5 | ipv6_ranges = [ 6 | "2001:db8::/32", 7 | "fe80::/10" 8 | ] 9 | } -------------------------------------------------------------------------------- /dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/microsoftgraph/powershell:latest 2 | 3 | WORKDIR /app 4 | COPY scripts/ExportGraphPermissions.ps1 /app/ 5 | 6 | ENTRYPOINT ["pwsh", "-Command", "$tenantId = $env:TENANT_ID; $clientId = $env:CLIENT_ID; $clientSecret = $env:CLIENT_SECRET; . /app/ExportGraphPermissions.ps1 -TenantId $tenantId -ClientId $clientId -ClientSecret $clientSecret"] 7 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_ios_managed_mobile_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {managed_app_protection_id}/{mobile_app_identifier} 3 | terraform import microsoft365_graph_beta_device_and_app_management_ios_managed_mobile_app.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_users_user_manager/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | # Minimal example - assign a manager to a user using existing user IDs 2 | resource "microsoft365_graph_beta_users_user_manager" "example" { 3 | user_id = "00000000-0000-0000-0000-000000000001" # The employee 4 | manager_id = "00000000-0000-0000-0000-000000000002" # The manager 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/common/shared_models/graph_beta/mime_content.go: -------------------------------------------------------------------------------- 1 | package sharedmodels 2 | 3 | import "github.com/hashicorp/terraform-plugin-framework/types" 4 | 5 | // MimeContentResourceModel struct to hold the mime content configuration 6 | type MimeContentResourceModel struct { 7 | Type types.String `tfsdk:"type"` 8 | Value types.String `tfsdk:"value"` 9 | } 10 | -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/acceptance/05_odata_comprehensive.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "odata_comprehensive" { 2 | filter_type = "odata" 3 | odata_filter = "operatingSystem eq 'Windows'" 4 | odata_top = 50 5 | odata_orderby = "lastSyncDateTime desc" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/unit/05_odata_advanced.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "odata_advanced" { 2 | filter_type = "odata" 3 | odata_filter = "isBuiltIn eq true" 4 | odata_orderby = "displayName" 5 | odata_select = "id,displayName,isPrivileged" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/unit/03_both_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Both package_identifier and search_term provided (should fail) 2 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 3 | package_identifier = "Microsoft.PowerToys" 4 | search_term = "PowerToys" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity/tests/responses/validate_read/get_owners_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directoryObjects", 3 | "value": [ 4 | { 5 | "@odata.type": "#microsoft.graph.user", 6 | "id": "22222222-2222-2222-2222-222222222222" 7 | } 8 | ] 9 | } 10 | 11 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/ios_managed_mobile_app/mocks/terraform/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_and_app_management_ios_managed_mobile_app" "minimal" { 2 | managed_app_protection_id = "00000000-0000-0000-0000-000000000002" 3 | mobile_app_identifier = { 4 | bundle_id = "com.example.testapp" 5 | } 6 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/directory_settings/resource_docs/reqs.md: -------------------------------------------------------------------------------- 1 | this api endpoint is a pile of crap. laods of it does work 2 | 3 | e.g │ Error: Create, Update and Delete operations on this Setting Template are not supported through this service. 4 | 5 | removing from the provider for now. may never implement. it's a half assed implementation. -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_android_managed_mobile_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {managed_app_protection_id}/{mobile_app_identifier} 3 | terraform import microsoft365_graph_beta_device_and_app_management_android_managed_mobile_app.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_windows_managed_mobile_app/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using composite ID format: {managed_app_protection_id}/{mobile_app_identifier} 3 | terraform import microsoft365_graph_beta_device_and_app_management_windows_managed_mobile_app.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 -------------------------------------------------------------------------------- /internal/provider/tests/terraform/acceptance/provider_proxy.tf: -------------------------------------------------------------------------------- 1 | # Test provider with proxy configuration 2 | provider "microsoft365" { 3 | auth_method = "device_code" 4 | 5 | client_options = { 6 | use_proxy = true 7 | proxy_url = "http://proxy.example.com:8080" 8 | proxy_username = "proxy-user" 9 | proxy_password = "proxy-password" 10 | } 11 | } -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/acceptance/05_odata_advanced.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "odata_advanced" { 2 | filter_type = "odata" 3 | odata_filter = "startsWith(displayName,'Microsoft')" 4 | odata_select = "id,appId,displayName,publisherName" 5 | odata_top = 10 6 | odata_skip = 0 7 | } -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/android_managed_mobile_app/mocks/terraform/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_and_app_management_android_managed_mobile_app" "minimal" { 2 | managed_app_protection_id = "00000000-0000-0000-0000-000000000002" 3 | mobile_app_identifier = { 4 | package_id = "com.example.testapp" 5 | } 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_definition/tests/responses/validate_delete/get_role_definition_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Role definition not found", 5 | "innerError": { 6 | "code": "ResourceNotFound", 7 | "message": "Role definition not found" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_v1.0/conditional_access_terms_of_use/tests/responses/validate_create/post_agreement_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid agreement data", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "test-request-id" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_backup_and_restore/resource.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_windows_backup_and_restore" "minimal" { 2 | state = "enabled" # "disabled" or "notConfigured" 3 | 4 | timeouts = { 5 | create = "30s" 6 | read = "30s" 7 | update = "30s" 8 | delete = "30s" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /internal/services/actions/device_management/graph_beta/managed_device/clean_windows_device/tests/terraform/unit/action_minimal.tf: -------------------------------------------------------------------------------- 1 | action "microsoft365_graph_beta_device_management_managed_device_clean_windows_device" "minimal" { 2 | managed_devices = [ 3 | { 4 | device_id = "12345678-1234-1234-1234-123456789abc" 5 | keep_user_data = false 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /internal/services/datasources/applications/service_principle/tests/terraform/unit/05_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_applications_service_principal" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "preferredSingleSignOnMode ne 'notSupported'" 4 | odata_count = true 5 | odata_orderby = "displayName" 6 | odata_search = "\"displayName:intune\"" 7 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/macos_pkg_app_metadata/tests/terraform/unit/03_both_provided.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Both installer_file_path_source and installer_url_source provided (should fail) 2 | data "microsoft365_utility_macos_pkg_app_metadata" "test" { 3 | installer_file_path_source = "/path/to/app.pkg" 4 | installer_url_source = "https://example.com/app.pkg" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint/tests/responses/validate_read/get_owners_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directoryObjects", 3 | "value": [ 4 | { 5 | "@odata.type": "#microsoft.graph.user", 6 | "id": "d27e5154-9e45-493c-a170-dc4ba69c28a2" 7 | } 8 | ] 9 | } 10 | 11 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint/tests/responses/validate_read/get_sponsors_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directoryObjects", 3 | "value": [ 4 | { 5 | "@odata.type": "#microsoft.graph.user", 6 | "id": "d27e5154-9e45-493c-a170-dc4ba69c28a2" 7 | } 8 | ] 9 | } 10 | 11 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/responses/validate_create/post_ip_application_segment_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "00000000-0000-0000-0000-000000000000", 3 | "destinationHost": "192.168.1.100", 4 | "destinationType": "ipAddress", 5 | "ports": [ 6 | "80-80", 7 | "443-443" 8 | ], 9 | "protocol": "tcp" 10 | } 11 | 12 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/windows_managed_mobile_app/mocks/terraform/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_and_app_management_windows_managed_mobile_app" "minimal" { 2 | managed_app_protection_id = "00000000-0000-0000-0000-000000000002" 3 | mobile_app_identifier = { 4 | windows_app_id = "com.example.testapp" 5 | } 6 | } -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/license_assignment/tests/responses/validate_create/post_user_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "Request_BadRequest", 4 | "message": "Invalid user ID format", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000" 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /internal/services/resources/windows_365/graph_beta/cloud_pc_role_definition/constants.go: -------------------------------------------------------------------------------- 1 | package graphBetaRoleDefinition 2 | 3 | // Built-in Cloud PC Role Definitions (Name -> UUID) 4 | var BuiltInCloudPCRoleDefinitions = map[string]string{ 5 | "Cloud PC Administrator": "b5c08161-a7af-481c-ace2-a20a69a48fb1", 6 | "Cloud PC Reader": "ea8e2fb8-e909-44e6-bae7-56757cf6f347", 7 | } 8 | -------------------------------------------------------------------------------- /internal/services/resources/windows_365/graph_beta/cloud_pc_role_definition/tests/responses/validate_delete/get_role_definition_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Role definition not found", 5 | "innerError": { 6 | "code": "ResourceNotFound", 7 | "message": "Role definition not found" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/common/powershell/resource_data.go: -------------------------------------------------------------------------------- 1 | package powershell 2 | 3 | import "github.com/deploymenttheory/terraform-provider-microsoft365/internal/client" 4 | 5 | // ResourceData combines GraphClientInterface and ProviderData for PowerShell resources 6 | type ResourceData struct { 7 | GraphClient client.GraphClientInterface 8 | ProviderData *client.ProviderData 9 | } 10 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/acceptance/05_odata_advanced.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "odata_advanced" { 2 | filter_type = "odata" 3 | odata_filter = "isBuiltIn eq true" 4 | odata_orderby = "displayName" 5 | odata_select = "id,displayName,description,isPrivileged" 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint_service_principal/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | # Minimal Agent Identity Blueprint Service Principal configuration 2 | resource "microsoft365_graph_beta_agents_agent_identity_blueprint_service_principal" "test_minimal" { 3 | app_id = "11111111-1111-1111-1111-111111111111" 4 | hard_delete = true 5 | } 6 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/responses/validate_create/post_device_category_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid device category data", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000888" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/terraform/acceptance/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_device_category" "test" { 2 | display_name = "Test Acceptance Device Category" 3 | 4 | timeouts = { 5 | create = "180s" 6 | read = "180s" 7 | update = "180s" 8 | delete = "180s" 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_device_category" "minimal" { 2 | display_name = "Test Minimal Device Category - Unique" 3 | 4 | timeouts = { 5 | create = "180s" 6 | read = "180s" 7 | update = "180s" 8 | delete = "180s" 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/macos_device_configuration_templates/tests/terraform/unit/MicrosoftRootCertificateAuthority2011.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deploymenttheory/terraform-provider-microsoft365/HEAD/internal/services/resources/device_management/graph_beta/macos_device_configuration_templates/tests/terraform/unit/MicrosoftRootCertificateAuthority2011.cer -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_v1.0/conditional_access_terms_of_use/tests/responses/validate_delete/get_agreement_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Agreement not found", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "test-request-id" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_linux_device_compliance_script/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import an existing Linux Device Compliance Script 4 | # Replace the GUID with the actual ID of your Linux device compliance script 5 | 6 | terraform import microsoft365_graph_beta_device_management_linux_device_compliance_script.example "00000000-0000-0000-0000-000000000000" -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_macos_device_compliance_policy/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import an existing macOS Device Compliance Policy 4 | # Replace the ID with the actual ID of your policy from Microsoft Graph API 5 | 6 | terraform import microsoft365_graph_beta_device_management_macos_device_compliance_policy.basic 00000000-0000-0000-0000-000000000001 7 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_device_compliance_script/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import an existing Windows Device Compliance Script 4 | # Replace the GUID with the actual ID of your device compliance script 5 | 6 | terraform import microsoft365_graph_beta_device_management_windows_device_compliance_script.example "00000000-0000-0000-0000-000000000000" -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/unit/06_odata_advanced.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "odata_advanced" { 2 | filter_type = "odata" 3 | odata_select = "id,productId,productDisplayName,publisherDisplayName" 4 | odata_top = 10 5 | odata_skip = 0 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/unit/06_odata_advanced.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "odata_advanced" { 2 | filter_type = "odata" 3 | odata_filter = "operatingSystem eq 'Windows'" 4 | odata_orderby = "deviceName" 5 | odata_select = "id,deviceName,operatingSystem,complianceState" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/assignment_filter/tests/responses/validate_create/post_assignment_filter_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid assignment filter data", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000888" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/unit/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "maximal" { 2 | group_lifetime_in_days = 365 3 | managed_group_types = "All" 4 | alternate_notification_emails = "admin@deploymenttheory.com;notifications@deploymenttheory.com" 5 | } -------------------------------------------------------------------------------- /internal/utilities/device_and_app_management/installers/macos_pkg/xar/utility.go: -------------------------------------------------------------------------------- 1 | package xar 2 | 3 | import ( 4 | "strings" 5 | 6 | "golang.org/x/text/unicode/norm" 7 | ) 8 | 9 | func Preprocess(input string) string { 10 | // Remove leading/trailing whitespace. 11 | input = strings.TrimSpace(input) 12 | // Normalize Unicode characters. 13 | return norm.NFC.String(input) 14 | } 15 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_and_app_management_mobile_app_supersedence/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # {relationship_id} 4 | # The relationship_id is typically in the format of source_app_id_target_app_id 5 | terraform import microsoft365_graph_beta_device_and_app_management_mobile_app_supersedence.example 00000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000002 -------------------------------------------------------------------------------- /internal/services/datasources/device_management/graph_beta/managed_device/tests/terraform/acceptance/04_odata_advanced.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_management_managed_device" "odata_advanced" { 2 | filter_type = "odata" 3 | odata_filter = "operatingSystem eq 'Windows'" 4 | odata_orderby = "deviceName" 5 | odata_select = "id,deviceName,operatingSystem,complianceState" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_identity_blueprint/tests/responses/validate_read/get_user_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#users/$entity", 3 | "@odata.type": "#microsoft.graph.user", 4 | "id": "d27e5154-9e45-493c-a170-dc4ba69c28a2", 5 | "displayName": "Test User", 6 | "userPrincipalName": "testuser@contoso.com" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/macos_custom_attribute_script/tests/terraform/acceptance/resource_missing_script_content.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_macos_custom_attribute_script" "test" { 2 | display_name = "Test Script" 3 | custom_attribute_type = "string" 4 | file_name = "test.sh" 5 | run_as_account = "system" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/macos_device_configuration_templates/tests/terraform/acceptance/MicrosoftRootCertificateAuthority2011.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deploymenttheory/terraform-provider-microsoft365/HEAD/internal/services/resources/device_management/graph_beta/macos_device_configuration_templates/tests/terraform/acceptance/MicrosoftRootCertificateAuthority2011.cer -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/acceptance/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "maximal" { 2 | group_lifetime_in_days = 365 3 | managed_group_types = "All" 4 | alternate_notification_emails = "admin@deploymenttheory.com;notifications@deploymenttheory.com" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_context/tests/responses/validate_create/post_authentication_context_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid authentication context data", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "test-request-id" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/license_assignment/tests/responses/validate_delete/get_user_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "User not found or licenses removed", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000" 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/user_manager/tests/responses/validate_read/get_manager_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity", 3 | "@odata.type": "#microsoft.graph.user", 4 | "id": "00000000-0000-0000-0000-000000000002", 5 | "displayName": "Test Manager", 6 | "userPrincipalName": "test.manager@example.com" 7 | } 8 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/unit/01_package_identifier.tf: -------------------------------------------------------------------------------- 1 | # Unit Test: Get package manifest by package identifier 2 | # Using Microsoft PC Manager (9PM860492SZD) - a known stable package in Microsoft Store 3 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 4 | package_identifier = "9PM860492SZD" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/macos_custom_attribute_script/tests/terraform/acceptance/resource_missing_custom_attribute_type.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_macos_custom_attribute_script" "test" { 2 | display_name = "Test Script" 3 | file_name = "test.sh" 4 | script_content = "#!/bin/bash\necho 'test'\nexit 0" 5 | run_as_account = "system" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/unit/platform_ios.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "ios" { 2 | display_name = "iOS Cleanup" 3 | device_cleanup_rule_platform_type = "ios" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_autopilot_deployment_profile/tests/responses/validate_get/get_group.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.type": "#microsoft.graph.group", 3 | "id": "00000000-0000-0000-0000-000000000000", 4 | "displayName": "Test Group", 5 | "description": "Test group for assignments", 6 | "groupTypes": [], 7 | "securityEnabled": true, 8 | "mailEnabled": false 9 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/unit/resource_selected.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "selected" { 2 | group_lifetime_in_days = 365 3 | managed_group_types = "Selected" 4 | alternate_notification_emails = "admin@deploymenttheory.com;notifications@deploymenttheory.com" 5 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_context/tests/responses/validate_delete/get_authentication_context_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Authentication context not found", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "test-request-id" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_agents_agent_identity_blueprint_federated_identity_credential/import.sh: -------------------------------------------------------------------------------- 1 | # Import an existing federated identity credential 2 | # The import ID format is: blueprint_id/credential_id 3 | terraform import microsoft365_graph_beta_agents_agent_identity_blueprint_federated_identity_credential.example "00000000-0000-0000-0000-000000000000/11111111-1111-1111-1111-111111111111" 4 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_users_user_mailbox_settings/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | # Example 1: Minimal mailbox settings configuration 2 | # This example shows the minimum required configuration for user mailbox settings 3 | resource "microsoft365_graph_beta_users_user_mailbox_settings" "minimal" { 4 | user_id = "john.doe@example.com" # Can be user ID (UUID) or UPN 5 | time_zone = "UTC" 6 | } 7 | 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_windows_365_cloud_pc_organization_settings/resource.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_windows_365_cloud_pc_organization_settings" "example" { 2 | enable_mem_auto_enroll = true 3 | enable_single_sign_on = true 4 | os_version = "windows11" 5 | user_account_type = "standardUser" 6 | windows_settings = { 7 | language = "en-US" 8 | } 9 | } -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection_assignment/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | # Agent Collection Assignment Unit Test - Minimal Configuration 2 | 3 | resource "microsoft365_graph_beta_agents_agent_collection_assignment" "test_minimal" { 4 | agent_instance_id = "11111111-1111-1111-1111-111111111111" 5 | agent_collection_id = "22222222-2222-2222-2222-222222222222" 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/responses/validate_delete/get_device_category_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "The requested resource was not found.", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000999" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/unit/platform_macOS.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "macOS" { 2 | display_name = "macOS Cleanup" 3 | device_cleanup_rule_platform_type = "macOS" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/terraform/acceptance/resource_selected.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group_lifecycle_expiration_policy" "selected" { 2 | group_lifetime_in_days = 365 3 | managed_group_types = "Selected" 4 | alternate_notification_emails = "admin@deploymenttheory.com;notifications@deploymenttheory.com" 5 | } -------------------------------------------------------------------------------- /examples/actions/graph_beta_device_management_windows_autopilot_device_identity_unassign_user_from_device/action.tf: -------------------------------------------------------------------------------- 1 | # Unassign user from device action 2 | action "microsoft365_graph_beta_device_management_windows_autopilot_device_identity_unassign_user_from_device" "example" { 3 | windows_autopilot_device_identity_id = "12345678-1234-1234-1234-123456789012" 4 | 5 | timeouts = { 6 | create = "5m" 7 | } 8 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/unit/04_binary.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "current_user" 3 | registry_key_path = "Software\\Test\\" 4 | value_name = "TestBinary" 5 | value_type = "REG_BINARY" 6 | value_data = "01AF3C" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/ios_managed_mobile_app/mocks/terraform/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_and_app_management_ios_managed_mobile_app" "maximal" { 2 | managed_app_protection_id = "00000000-0000-0000-0000-000000000003" 3 | version = "1.5" 4 | mobile_app_identifier = { 5 | bundle_id = "com.example.complexapp" 6 | } 7 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/assignment_filter/tests/responses/validate_delete/get_assignment_filter_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "The requested resource was not found.", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000999" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/platform_ios.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "ios" { 2 | display_name = "Acc - iOS Cleanup" 3 | device_cleanup_rule_platform_type = "ios" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/unit/platform_all.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "all" { 2 | display_name = "All Platforms Cleanup" 3 | device_cleanup_rule_platform_type = "all" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_definition/tests/responses/validate_create/get_role_definition_no_permissions.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test-role-definition-no-permissions-id", 3 | "displayName": "Test Role Definition with Role Scope Tags", 4 | "description": "Test description", 5 | "isBuiltIn": false, 6 | "isBuiltInRoleDefinition": false, 7 | "roleScopeTagIds": ["0", "1", "2"] 8 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_scope_tag/tests/responses/validate_delete/get_role_scope_tag_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "The requested role scope tag was not found", 5 | "details": [ 6 | { 7 | "code": "ItemNotFound", 8 | "message": "Role scope tag not found" 9 | } 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/responses/validate_create/post_filtering_policy_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid filtering policy data", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000888" 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/network_filtering_policy/tests/responses/validate_delete/get_filtering_policy_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000999" 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /internal/services/resources/windows_365/graph_beta/cloud_pc_role_definition/tests/responses/validate_create/get_role_definition_no_permissions.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test-role-definition-no-permissions-id", 3 | "displayName": "Test Role Definition with Role Scope Tags", 4 | "description": "Test description", 5 | "isBuiltIn": false, 6 | "isBuiltInRoleDefinition": false, 7 | "roleScopeTagIds": ["0", "1", "2"] 8 | } -------------------------------------------------------------------------------- /examples/actions/graph_beta_device_management_windows_autopilot_device_identity_allow_next_enrollment/action.tf: -------------------------------------------------------------------------------- 1 | # Allow next enrollment for an Autopilot device 2 | action "microsoft365_graph_beta_device_management_windows_autopilot_device_identity_allow_next_enrollment" "example" { 3 | windows_autopilot_device_identity_id = "12345678-1234-1234-1234-123456789abc" 4 | 5 | timeouts = { 6 | create = "5m" 7 | } 8 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_windows_backup_and_restore/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using Windows Restore Device Enrollment Configuration ID 3 | # Note: This resource uses a built-in configuration that cannot be deleted, only disabled 4 | terraform import microsoft365_graph_beta_device_management_windows_backup_and_restore.example 54fac284-7866-43e5-860a-9c8e10fa3d7d_WindowsRestore 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_device_management_device_configuration_assignment/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | terraform import microsoft365_graph_device_management_device_configuration_assignment.example 00000000-0000-0000-0000-000000000000:11111111-1111-1111-1111-111111111111 4 | # where 00000000-0000-0000-0000-000000000000 is the device configuration ID and 11111111-1111-1111-1111-111111111111 is the assignment ID -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/acceptance/01_package_identifier.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Get package manifest by package identifier 2 | # Using Microsoft PC Manager (9PM860492SZD) - a known stable package in Microsoft Store 3 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 4 | package_identifier = "9PM860492SZD" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/unit/05_invalid_context.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "invalid_context" 3 | registry_key_path = "Software\\Test\\" 4 | value_name = "TestValue" 5 | value_type = "REG_DWORD" 6 | value_data = "1" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/macos_custom_attribute_script/tests/terraform/acceptance/resource_missing_display_name.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_macos_custom_attribute_script" "test" { 2 | custom_attribute_type = "string" 3 | file_name = "test.sh" 4 | script_content = "#!/bin/bash\necho 'test'\nexit 0" 5 | run_as_account = "system" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/macos_custom_attribute_script/tests/terraform/acceptance/resource_missing_file_name.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_macos_custom_attribute_script" "test" { 2 | display_name = "Test Script" 3 | custom_attribute_type = "string" 4 | script_content = "#!/bin/bash\necho 'test'\nexit 0" 5 | run_as_account = "system" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/unit/platform_windows.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "windows" { 2 | display_name = "Windows Cleanup" 3 | device_cleanup_rule_platform_type = "windows" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_scope_tag/tests/responses/validate_create/post_role_scope_tag_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid role scope tag data", 5 | "details": [ 6 | { 7 | "code": "ValidationFailed", 8 | "message": "The provided role scope tag data is not valid" 9 | } 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/license_assignment/tests/terraform/unit/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_license_assignment" "maximal" { 2 | group_id = "00000000-0000-0000-0000-000000000003" 3 | sku_id = "44444444-4444-4444-4444-444444444444" 4 | disabled_plans = [ 5 | "55555555-5555-5555-5555-555555555555", 6 | "66666666-6666-6666-6666-666666666666" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_agents_agent_instance/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Import an existing Agent Instance using the Object ID (id) 4 | # The ID can be found in the Microsoft Entra admin center or via the Graph API: 5 | # GET https://graph.microsoft.com/beta/agentRegistry/agentInstances 6 | 7 | terraform import microsoft365_graph_beta_agents_agent_instance.example 00000000-0000-0000-0000-000000000000 8 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_attribute_set/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Import using ID format: {id} 3 | # note the id for this resource Can be up to 32 characters long and include Unicode characters. Cannot contain spaces or special characters. Cannot be changed later. Case sensitive. 4 | terraform import microsoft365_graph_beta_identity_and_access_attribute_set.example "Engineering" 5 | 6 | -------------------------------------------------------------------------------- /internal/services/datasources/identity_and_access/graph_beta/role_definitions/tests/terraform/unit/06_odata_comprehensive.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_identity_and_access_role_definitions" "odata_comprehensive" { 2 | filter_type = "odata" 3 | odata_filter = "isPrivileged eq true" 4 | odata_top = 5 5 | odata_skip = 0 6 | odata_count = true 7 | odata_orderby = "displayName desc" 8 | } 9 | 10 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/unit/06_invalid_value_type.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "current_user" 3 | registry_key_path = "Software\\Test\\" 4 | value_name = "TestValue" 5 | value_type = "INVALID_TYPE" 6 | value_data = "1" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/responses/validate_get/get_ip_application_segment_maximal.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "22222222-2222-2222-2222-222222222222", 3 | "destinationHost": "*.example.com", 4 | "destinationType": "dnsSuffix", 5 | "ports": [ 6 | "80-80", 7 | "443-443", 8 | "8080-8080", 9 | "8443-8443" 10 | ], 11 | "protocol": "tcp" 12 | } 13 | 14 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_applications_ip_application_segment" "ip_segment_minimal" { 2 | application_id = "12345678-1234-1234-1234-123456789012" 3 | destination_host = "192.168.1.100" 4 | destination_type = "ipAddress" 5 | ports = ["80-80"] 6 | protocol = "tcp" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/android_managed_mobile_app/mocks/terraform/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_and_app_management_android_managed_mobile_app" "maximal" { 2 | managed_app_protection_id = "00000000-0000-0000-0000-000000000003" 3 | version = "1.5" 4 | mobile_app_identifier = { 5 | package_id = "com.example.complexapp" 6 | } 7 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/macos_custom_attribute_script/tests/terraform/acceptance/resource_missing_run_as_account.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_macos_custom_attribute_script" "test" { 2 | display_name = "Test Script" 3 | custom_attribute_type = "string" 4 | file_name = "test.sh" 5 | script_content = "#!/bin/bash\necho 'test'\nexit 0" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/platform_all.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "all" { 2 | display_name = "Acc - All Platforms Cleanup" 3 | device_cleanup_rule_platform_type = "all" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/platform_macOS.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "macOS" { 2 | display_name = "Acc - macOS Cleanup" 3 | device_cleanup_rule_platform_type = "macOS" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/unit/platform_chromeOS.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "chromeOS" { 2 | display_name = "ChromeOS Cleanup" 3 | device_cleanup_rule_platform_type = "chromeOS" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/attribute_set/tests/responses/validate_create/post_attribute_set_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid attribute set data", 5 | "details": [ 6 | { 7 | "code": "InvalidAttributeSet", 8 | "message": "The provided attribute set data is invalid" 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /internal/services/resources/users/graph_beta/license_assignment/tests/terraform/unit/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_users_user_license_assignment" "maximal" { 2 | user_id = "00000000-0000-0000-0000-000000000003" 3 | sku_id = "44444444-4444-4444-4444-444444444444" 4 | disabled_plans = [ 5 | "55555555-5555-5555-5555-555555555555", 6 | "66666666-6666-6666-6666-666666666666" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_agents_agent_collection_assignment/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | # Minimal Agent Collection Assignment configuration 2 | # Assigns an agent instance to an agent collection 3 | resource "microsoft365_graph_beta_agents_agent_collection_assignment" "example" { 4 | agent_instance_id = "00000000-0000-0000-0000-000000000001" 5 | agent_collection_id = "00000000-0000-0000-0000-000000000002" 6 | } 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Resource not found", 5 | "innerError": { 6 | "date": "2025-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000", 8 | "client-request-id": "00000000-0000-0000-0000-000000000000" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection_assignment/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request", 5 | "innerError": { 6 | "date": "2025-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000", 8 | "client-request-id": "00000000-0000-0000-0000-000000000000" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/terraform/unit/resource_fqdn.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_applications_ip_application_segment" "ip_segment_fqdn" { 2 | application_id = "12345678-1234-1234-1234-123456789012" 3 | destination_host = "app.example.com" 4 | destination_type = "fqdn" 5 | ports = ["443-443", "8443-8443"] 6 | protocol = "tcp" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/applications/graph_beta/ip_application_segment/tests/terraform/unit/resource_ip_range.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_applications_ip_application_segment" "ip_segment_range" { 2 | application_id = "12345678-1234-1234-1234-123456789012" 3 | destination_host = "192.168.1.0/24" 4 | destination_type = "ipRangeCidr" 5 | ports = ["443-443"] 6 | protocol = "tcp" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/windows_managed_mobile_app/mocks/terraform/resource_maximal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_and_app_management_windows_managed_mobile_app" "maximal" { 2 | managed_app_protection_id = "00000000-0000-0000-0000-000000000003" 3 | version = "1.5" 4 | mobile_app_identifier = { 5 | windows_app_id = "com.example.complexapp" 6 | } 7 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/platform_windows.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "windows" { 2 | display_name = "Acc - Windows Cleanup" 3 | device_cleanup_rule_platform_type = "windows" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/responses/validate_create/get_policy_all.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#groupLifecyclePolicies/$entity", 3 | "id": "11111111-1111-1111-1111-111111111111", 4 | "groupLifetimeInDays": 180, 5 | "managedGroupTypes": "All", 6 | "alternateNotificationEmails": "admin@deploymenttheory.com" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/responses/validate_create/get_policy_none.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#groupLifecyclePolicies/$entity", 3 | "id": "33333333-3333-3333-3333-333333333333", 4 | "groupLifetimeInDays": 365, 5 | "managedGroupTypes": "None", 6 | "alternateNotificationEmails": "admin@deploymenttheory.com" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/responses/validate_create/post_policy_all.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#groupLifecyclePolicies/$entity", 3 | "id": "11111111-1111-1111-1111-111111111111", 4 | "groupLifetimeInDays": 180, 5 | "managedGroupTypes": "All", 6 | "alternateNotificationEmails": "admin@deploymenttheory.com" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group_lifecycle_expiration_policy/tests/responses/validate_create/post_policy_none.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#groupLifecyclePolicies/$entity", 3 | "id": "33333333-3333-3333-3333-333333333333", 4 | "groupLifetimeInDays": 365, 5 | "managedGroupTypes": "None", 6 | "alternateNotificationEmails": "admin@deploymenttheory.com" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/attribute_set/tests/responses/validate_delete/get_attribute_set_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "Attribute set not found", 5 | "details": [ 6 | { 7 | "code": "AttributeSetNotFound", 8 | "message": "The specified attribute set does not exist" 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/microsoft_store_package_manifest_metadata/tests/terraform/acceptance/03_validate_structure.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Validate full package manifest structure 2 | # Using WPS Office 2022 (XP8M1ZJCZ99QJW) - has rich metadata including locales, installers, agreements 3 | data "microsoft365_utility_microsoft_store_package_manifest_metadata" "test" { 4 | package_identifier = "XP8M1ZJCZ99QJW" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/unit/02_all_users_string.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "all_users" 3 | registry_key_path = "Software\\MyApp\\Settings\\" 4 | value_name = "EnableFeature" 5 | value_type = "REG_SZ" 6 | value_data = "Enabled" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/unit/03_multistring.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "current_user" 3 | registry_key_path = "Software\\Test\\" 4 | value_name = "TestMulti" 5 | value_type = "REG_MULTI_SZ" 6 | value_data = "Line1\nLine2\nLine3" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/unit/07_invalid_dword_value.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "current_user" 3 | registry_key_path = "Software\\Test\\" 4 | value_name = "TestValue" 5 | value_type = "REG_DWORD" 6 | value_data = "not_a_number" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/platform_chromeOS.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "chromeOS" { 2 | display_name = "Acc - ChromeOS Cleanup" 3 | device_cleanup_rule_platform_type = "chromeOS" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/unit/platform_androidAOSP.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "androidAOSP" { 2 | display_name = "Android AOSP Cleanup" 3 | device_cleanup_rule_platform_type = "androidAOSP" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/settings_catalog_configuration_policy/validator.go: -------------------------------------------------------------------------------- 1 | package graphBetaSettingsCatalogConfigurationPolicy 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/hashicorp/terraform-plugin-framework/schema/validator" 7 | ) 8 | 9 | func ValidateSettingsCatalogConfigurationPolicy(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_platform_script/tests/responses/validate_create/post_windows_platform_script_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid Windows Platform Script data", 5 | "details": [ 6 | { 7 | "code": "ValidationError", 8 | "message": "The provided script data is invalid" 9 | } 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_remediation_script/tests/responses/validate_delete/get_windows_remediation_script_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "NotFound", 4 | "message": "The specified device health script was not found.", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/custom_security_attribute_allowed_value/tests/terraform/unit/test_config_basic.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_custom_security_attribute_allowed_value" "test" { 2 | custom_security_attribute_definition_id = "Engineering_Project" 3 | id = "Alpine" 4 | is_active = true 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/custom_security_attribute_allowed_value/tests/terraform/unit/test_config_inactive.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_custom_security_attribute_allowed_value" "test" { 2 | custom_security_attribute_definition_id = "Engineering_Project" 3 | id = "Legacy" 4 | is_active = false 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/custom_security_attribute_allowed_value/tests/terraform/unit/test_config_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_custom_security_attribute_allowed_value" "test" { 2 | custom_security_attribute_definition_id = "Engineering_Project" 3 | id = "Minimal" 4 | is_active = true 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/custom_security_attribute_allowed_value/tests/terraform/unit/test_config_update.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_custom_security_attribute_allowed_value" "test" { 2 | custom_security_attribute_definition_id = "Engineering_Project" 3 | id = "Alpine" 4 | is_active = false 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/acceptance/02_all_users_string.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "all_users" 3 | registry_key_path = "Software\\MyApp\\Settings\\" 4 | value_name = "EnableFeature" 5 | value_type = "REG_SZ" 6 | value_data = "Enabled" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/resource_invalid_platform.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "test" { 2 | display_name = "Invalid Platform" 3 | device_cleanup_rule_platform_type = "invalid_platform" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/terms_and_conditions/tests/responses/validate_delete/get_terms_and_conditions_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "The requested terms and conditions was not found", 5 | "details": [ 6 | { 7 | "code": "ItemNotFound", 8 | "message": "Terms and conditions not found" 9 | } 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_platform_script/tests/responses/validate_delete/get_windows_platform_script_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "The Windows Platform Script was not found", 5 | "details": [ 6 | { 7 | "code": "NotFound", 8 | "message": "The requested script does not exist" 9 | } 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_update_ring/tests/responses/validate_delete/get_windows_update_ring_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "ResourceNotFound", 4 | "message": "The Windows update ring with the specified ID was not found.", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group/tests/terraform/unit/resource_scenario_1_security_group_assigned.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_groups_group" "scenario_1" { 2 | display_name = "acc-security-group-with-assigned-membership-type" 3 | mail_enabled = false 4 | mail_nickname = "c660a1b4-5" 5 | security_enabled = true 6 | description = "test" 7 | hard_delete = true 8 | } 9 | 10 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_agents_agent_identity_blueprint_identifier_uri/import.sh: -------------------------------------------------------------------------------- 1 | # Import an identifier URI using the format: blueprint_id/identifier_uri 2 | # Note: The identifier_uri should be URL-encoded if it contains special characters 3 | terraform import microsoft365_graph_beta_agents_agent_identity_blueprint_identifier_uri.example "00000000-0000-0000-0000-000000000000/api://00000000-0000-0000-0000-000000000000" 4 | 5 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_applications_service_principal_app_role_assigned_to/import.sh: -------------------------------------------------------------------------------- 1 | # Import an existing app role assignment 2 | # The import ID is the app role assignment ID returned by Microsoft Graph 3 | 4 | # {app_role_assignment_id} - The unique identifier of the app role assignment 5 | terraform import microsoft365_graph_beta_applications_service_principal_app_role_assigned_to.example {app_role_assignment_id} 6 | 7 | -------------------------------------------------------------------------------- /internal/services/datasources/device_and_app_management/graph_beta/mobile_app_catalog_package/tests/terraform/unit/05_odata_filter.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_graph_beta_device_and_app_management_mobile_app_catalog_package" "odata_filter" { 2 | filter_type = "odata" 3 | odata_filter = "productDisplayName eq '7-Zip'" 4 | odata_count = true 5 | odata_orderby = "productDisplayName" 6 | odata_search = "\"productDisplayName:7-Zip\"" 7 | } 8 | -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/acceptance/04_expand_string.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "all_users" 3 | registry_key_path = "Software\\MyApp\\" 4 | value_name = "InstallPath" 5 | value_type = "REG_EXPAND_SZ" 6 | value_data = "%ProgramFiles%\\MyApp" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection_assignment/tests/responses/error_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "Request_ResourceNotFound", 4 | "message": "Resource not found", 5 | "innerError": { 6 | "date": "2025-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000", 8 | "client-request-id": "00000000-0000-0000-0000-000000000000" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_driver_update_profile/tests/responses/validate_create/post_windows_driver_update_profile_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid Windows Driver Update Profile data.", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000888" 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_platform_script/tests/responses/validate_create/post_windows_platform_script_system_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceManagementScripts/$entity", 3 | "@odata.type": "#microsoft.graph.deviceManagementScript", 4 | "createdDateTime": "2024-01-01T00:00:00Z", 5 | "lastModifiedDateTime": "2024-01-01T00:00:00Z" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_platform_script/tests/responses/validate_create/post_windows_platform_script_user_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceManagementScripts/$entity", 3 | "@odata.type": "#microsoft.graph.deviceManagementScript", 4 | "createdDateTime": "2024-01-01T00:00:00Z", 5 | "lastModifiedDateTime": "2024-01-01T00:00:00Z" 6 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/windows_remediation_script_registry_key_generator/tests/terraform/acceptance/03_qword.tf: -------------------------------------------------------------------------------- 1 | data "microsoft365_utility_windows_remediation_script_registry_key_generator" "test" { 2 | context = "current_user" 3 | registry_key_path = "Software\\MyCompany\\Settings\\" 4 | value_name = "LargeValue" 5 | value_type = "REG_QWORD" 6 | value_data = "9223372036854775807" 7 | } 8 | 9 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/platform_androidAOSP.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "androidAOSP" { 2 | display_name = "Acc - Android AOSP Cleanup" 3 | device_cleanup_rule_platform_type = "androidAOSP" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/managed_device_cleanup_rule/tests/terraform/acceptance/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_managed_device_cleanup_rule" "test" { 2 | display_name = "Test Acceptance Managed Device Cleanup Rule" 3 | device_cleanup_rule_platform_type = "windows" 4 | device_inactivity_before_retirement_in_days = 60 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_scope_tag/tests/responses/validate_create/get_role_scope_tag_maximal.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "87654321-4321-4321-4321-210987654321", 3 | "displayName": "unit-test-role-scope-tag-maximal-ABC12345", 4 | "description": "unit-test-role-scope-tag-maximal-ABC12345", 5 | "isBuiltIn": false, 6 | "createdDateTime": "2024-01-01T00:00:00Z", 7 | "lastModifiedDateTime": "2024-01-01T00:00:00Z" 8 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/role_scope_tag/tests/responses/validate_create/get_role_scope_tag_minimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "12345678-1234-1234-1234-123456789012", 3 | "displayName": "unit-test-role-scope-tag-minimal-ABC12345", 4 | "description": "unit-test-role-scope-tag-minimal-ABC12345", 5 | "isBuiltIn": false, 6 | "createdDateTime": "2024-01-01T00:00:00Z", 7 | "lastModifiedDateTime": "2024-01-01T00:00:00Z" 8 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_quality_update_policy/tests/responses/validate_create/post_windows_quality_update_policy_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid Windows Quality Update Policy data.", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000888" 8 | } 9 | } 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_quality_update_policy/tests/terraform/unit/resource_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_windows_quality_update_policy" "minimal" { 2 | display_name = "Test Minimal Windows Quality Update Policy - Unique" 3 | 4 | timeouts = { 5 | create = "30s" 6 | read = "30s" 7 | update = "30s" 8 | delete = "30s" 9 | } 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/group/tests/responses/validate_error/error_invalid_display_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Validation error: Invalid display name", 5 | "innerError": { 6 | "date": "2023-01-01T00:00:00", 7 | "request-id": "12345678-1234-1234-1234-123456789012", 8 | "client-request-id": "12345678-1234-1234-1234-123456789012" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_context/tests/responses/validate_get/get_authentication_context.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/conditionalAccess/authenticationContextClassReferences/$entity", 3 | "id": "c8", 4 | "displayName": "Test Authentication Context", 5 | "description": "Test authentication context for unit testing", 6 | "isAvailable": true 7 | } -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/authentication_strength_policy/tests/terraform/unit/resource_auth_strength_minimal.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_authentication_strength_policy" "auth_strength_minimal" { 2 | display_name = "unit-test-auth-strength-min" 3 | description = "Unit test minimal authentication strength policy" 4 | 5 | allowed_combinations = [ 6 | "password,sms" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /internal/services/resources/identity_and_access/graph_beta/custom_security_attribute_allowed_value/tests/terraform/unit/test_config_with_spaces.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_custom_security_attribute_allowed_value" "test" { 2 | custom_security_attribute_definition_id = "Engineering_Department" 3 | id = "Human Resources" 4 | is_active = true 5 | } 6 | 7 | -------------------------------------------------------------------------------- /internal/services/resources/agents/graph_beta/agent_collection/tests/responses/error_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid request body or required fields missing", 5 | "innerError": { 6 | "date": "2025-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000", 8 | "client-request-id": "00000000-0000-0000-0000-000000000000" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/device_category/tests/terraform/acceptance/resource_role_scope_tags.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_device_category" "role_tags" { 2 | display_name = "Test Role Scope Tags Device Category" 3 | role_scope_tag_ids = ["0", "1", "2"] 4 | 5 | timeouts = { 6 | create = "180s" 7 | read = "180s" 8 | update = "180s" 9 | delete = "180s" 10 | } 11 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_feature_update_profile/tests/responses/validate_create/post_windows_feature_update_profile_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid Windows Feature Update Profile data.", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000888" 8 | } 9 | } 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /internal/services/resources/groups/graph_beta/license_assignment/tests/responses/validate_create/post_group_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "Request_BadRequest", 4 | "message": "Invalid group ID format", 5 | "innerError": { 6 | "date": "2024-01-01T00:00:00", 7 | "request-id": "00000000-0000-0000-0000-000000000000", 8 | "client-request-id": "00000000-0000-0000-0000-000000000000" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_device_management_device_category/resource.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_device_management_device_category" "example" { 2 | display_name = "Corporate Tablets" 3 | description = "This category represents company-owned tablets" 4 | 5 | role_scope_tag_ids = ["8", "9"] 6 | 7 | timeouts = { 8 | create = "10s" 9 | read = "10s" 10 | update = "10s" 11 | delete = "10s" 12 | } 13 | } -------------------------------------------------------------------------------- /examples/resources/microsoft365_graph_beta_identity_and_access_attribute_set/resource.tf: -------------------------------------------------------------------------------- 1 | resource "microsoft365_graph_beta_identity_and_access_attribute_set" "example" { 2 | id = "Engineering" 3 | description = "Attributes for engineering team" 4 | max_attributes_per_set = 25 // max is 500 5 | 6 | timeouts = { 7 | create = "30m" 8 | read = "10m" 9 | update = "30m" 10 | delete = "30m" 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/datasources/utility/entra_id_sid_converter/tests/terraform/acceptance/04_bidirectional.tf: -------------------------------------------------------------------------------- 1 | # Acceptance Test: Bidirectional conversion (round trip) 2 | data "microsoft365_utility_entra_id_sid_converter" "sid_to_oid" { 3 | sid = "S-1-12-1-1943430372-1249052806-2496021943-3034400218" 4 | } 5 | 6 | data "microsoft365_utility_entra_id_sid_converter" "oid_to_sid" { 7 | object_id = "73d664e4-0886-4a73-b745-c694da45ddb4" 8 | } 9 | 10 | -------------------------------------------------------------------------------- /internal/services/resources/device_and_app_management/graph_beta/ios_managed_device_app_configuration_policy/tests/responses/validate_create/post_ios_mobile_app_configuration_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid iOS mobile app configuration data", 5 | "details": [ 6 | { 7 | "code": "InvalidRequest", 8 | "message": "The request is invalid" 9 | } 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/app_control_for_business_built_in_controls/tests/responses/validate_update/patch_app_control_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/configurationPolicies/$entity", 3 | "@odata.type": "#microsoft.graph.deviceManagementConfigurationPolicy", 4 | "createdDateTime": "2024-01-01T00:00:00Z", 5 | "lastModifiedDateTime": "2024-01-02T00:00:00Z" 6 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_device_compliance_script/tests/responses/validate_create/post_windows_device_compliance_script_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid Windows Device Compliance Script data", 5 | "details": [ 6 | { 7 | "code": "ValidationError", 8 | "message": "The provided script data is invalid" 9 | } 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /internal/services/resources/device_management/graph_beta/windows_driver_update_profile/tests/responses/validate_assign/post_windows_driver_update_profile_assign_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "BadRequest", 4 | "message": "Invalid assignment data for Windows Driver Update Profile.", 5 | "innerError": { 6 | "date": "2024-01-01T00:02:00", 7 | "request-id": "00000000-0000-0000-0000-000000000888" 8 | } 9 | } 10 | } 11 | --------------------------------------------------------------------------------