Skip to main content

🧠 Microsoft Entra ID Guest Users restricted to their own directory objects - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• Azure Active DirectoryCA10__CaAzureActiveDirectory__c4

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:45:31.572196398Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 199βœ”οΈ CA10Z1__Azure_Active_Directory_Auth_Policies__r.has(INCOMPLIANT)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ CA10Z1__Azure_Active_Directory_Auth_Policies__r.has(INCOMPLIANT)βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ CA10Z1__Azure_Active_Directory_Auth_Policies__r.has(COMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/policy.yaml0FC118F601629447B913060C5E022AC0
Open/ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/prod.logic.yaml6C739FA73A7EA12D4BEBB4285749A6A2
Open/types/CA10Z1__CaAzureActiveDirectoryAuthPolicy__c/object.extracts.yaml0D0D0A881B5C2BBE41D5A8A7C629F5FD
Open/ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/test-data.json89D62C9E78AB8CA068A9483524451D67

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/azure/microsoft-entra-id/guest-users-restricted-to-their-own-directory/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAzureActiveDirectory__c"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "The role templateId is set to either User or Guest User."
remediationMessage: "Consider updating the templateId to the Restricted Guest User role."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10Z1__Azure_Active_Directory_Auth_Policies__r"
- status: "COMPLIANT"
currentStateMessage: "The role templateId is set to Restricted Guest User."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10Z1__Azure_Active_Directory_Auth_Policies__r"
- status: "UNDETERMINED"
currentStateMessage: "Unable to determine Guest User role."
check:
RELATED_LIST_HAS:
status: "UNDETERMINED"
relationshipName: "CA10Z1__Azure_Active_Directory_Auth_Policies__r"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "The Authorization Policy for Microsoft Entra is not present in the CMDB."
relatedLists:
- relationshipName: "CA10Z1__Azure_Active_Directory_Auth_Policies__r"
importExtracts:
- file: "/types/CA10Z1__CaAzureActiveDirectoryAuthPolicy__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "The role templateId is set to User."
remediationMessage: "Consider updating the templateId to the Restricted Guest User role."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__guestUserRoleId__c"
right:
TEXT: "a0b1b346-4d3e-4e8b-98f8-753987be4970"
- status: "INCOMPLIANT"
currentStateMessage: "The role templateId is set to Guest User."
remediationMessage: "Consider updating the templateId to the Restricted Guest User role."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__guestUserRoleId__c"
right:
TEXT: "10dae51f-b6af-4016-8d66-8c2a99b929b3"
- status: "COMPLIANT"
currentStateMessage: "The role templateId is set to Restricted Guest User."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__guestUserRoleId__c"
right:
TEXT: "2af84b1e-32c8-42b7-82bc-daa82404023b"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."