Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AADConditionalAccessPolicy - BUG - Malformed PATCH Request MSGraph #5389

Closed
pangjaa opened this issue Nov 12, 2024 · 0 comments · Fixed by #5392 or #5397
Closed

AADConditionalAccessPolicy - BUG - Malformed PATCH Request MSGraph #5389

pangjaa opened this issue Nov 12, 2024 · 0 comments · Fixed by #5392 or #5397
Assignees
Labels
Bug Something isn't working Entra ID

Comments

@pangjaa
Copy link

pangjaa commented Nov 12, 2024

Description of the issue

After updating to DSC from 1.24.1016.1, I am unable to update Conditional Access Policies provisioned through DSC. Looking at the changelog for [1.24.1106.3(]https://github.com/microsoft/Microsoft365DSC/releases/tag/1.24.1106.3), InsiderRiskLevels was recently added.

Looking at DSC ETW logs, I see that it is passed as an empty string: "insiderRiskLevels": "", in the json body. I believe that this value must be minor, moderate, elevated, or unknownFutureValue per https://learn.microsoft.com/en-us/graph/api/resources/conditionalaccessconditionset?view=graph-rest-beta

Image

{
    "displayName": "Block Access Except",
    "sessionControls": null,
    "ConditionalAccessPolicyId": "<policy-guid>",
    "state": "enabled",
    "conditions": {
        "clientAppTypes": [
            "all"
        ],
        "signInRiskLevels": [],
        "users": {
            "excludeRoles": [],
            "includeRoles": [],
            "excludeUsers": [
                "<guid>",
            ],
            "includeUsers": [
                "All"
            ],
            "includeGroups": [],
            "excludeGroups": [
                "<guid>"
            ]
        },
        "platforms": null,
        "insiderRiskLevels": "",
        "userRiskLevels": [],
        "applications": {
            "includeApplications": [
                "MicrosoftAdminPortals"
            ]
        }
    },
    "grantControls": {
        "builtInControls": [
            "block"
        ],
        "operator": "OR"
    }
}

Microsoft 365 DSC Version

1.24.1106.3

Which workloads are affected

Azure Active Directory (Entra ID)

The DSC configuration

Verbose logs showing the problem

{
    "error": {
        "code": "BadRequest",
        "message": "The server could not process the request because it is malformed or incorrect.",
        "innerError": {
            "message": "1007: Incoming ConditionalAccessPolicy object is null or does not match the schema of ConditionalAccessPolicy type. For examples, please see API documentation at https://docs.microsoft.com/en-us/graph/api/conditionalaccesspolicy-update?view=graph-rest-beta.",
            "date": "2024-11-11T18:16:29",
            "request-id": "20dfef48-1af7-4374-adbe-317b9c171157",
            "client-request-id": "546a13c4-180a-4bd4-89ec-d0153d527f9a"
        }
    }
}

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2022 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}
@ykuijs ykuijs self-assigned this Nov 13, 2024
@ykuijs ykuijs added Bug Something isn't working Entra ID labels Nov 13, 2024
ykuijs added a commit to ykuijs/Microsoft365DSC that referenced this issue Nov 13, 2024
ykuijs added a commit to ykuijs/Microsoft365DSC that referenced this issue Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Entra ID
Projects
None yet
2 participants