-
Notifications
You must be signed in to change notification settings - Fork 302
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
Grant Controls not working for B2C Directories #704
Comments
Hi @PatMcHugh, thanks for reporting this. I'll do some testing to try and reproduce. In the meantime, if you are able to post a debug log covering this error, that would be really helpful as it shows exactly what is being sent to the API. Thanks! |
Hey @manicminer - was doing some debug on this yesterday. = Begin AzureAD Request ============================ POST /v1.0/TENANTID/identity/conditionalAccess/policies HTTP/1.1 {"conditions":{"applications":{"includeApplications":["All"],"excludeApplications":[],"includeUserActions":[]},"clientAppTypes":["all"],"locations":{"includeLocations":["All"],"excludeLocations":[]},"platforms":{"includePlatforms":["all"],"excludePlatforms":[]},"signInRiskLevels":[],"userRiskLevels":[],"users":{"includeUsers":[],"excludeUsers":[],"includeGroups":[],"excludeGroups":[],"includeRoles":["62e90394-69f5-4237-9190-012177145e10","fdd7a751-b60b-444a-984c-02652fe8fa1c","fe930be7-5e62-47db-91af-98c3a49a38b1"],"excludeRoles":[]}},"displayName":"MFA KLP Non-Prod","grantControls":{"operator":"AND","builtInControls":["mfa"],"customAuthenticationFactors":[],"termsOfUse":[]},"sessionControls":{},"state":"disabled"} HTTP/1.1 400 Bad Request 138 I then used the graph explorer to narrow down the issue, the inclusion of "sessionControls":{} results in this error within the B2C tenants only - when "sessionControls": null or completely removed - the resource will create with no issue. |
@dougan001 Many thanks for the feedback, that helps narrow down the cause. This may be challenging to resolve since the API has bugs around handling of the I'm working on improving our testing setup for B2C directories which will need to be in place first, in order to get proper testing coverage on this to try and resolve. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Would like to surface this. Very relevant for our use case |
Is there a solution or workaround for this? |
I'm also curious about possible workaround. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@manicminer & @PatMcHugh , I am facing similar issue, any update on the solution.? |
Nearly 2 years ago. It doesn't look like it will be fixed any time soon, if at all. |
Community Note
Terraform (and AzureAD Provider) Version
terraform provider 2.13.0
terraform version 0.15.0
Affected Resource(s)
azuread_conditional_access_policy
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
A conditional access policy requiring MFA should have been created on a B2C tenant.
Actual Behavior
The following error occurs after running apply:
ConditionalAccessPoliciesClient.BaseClient.Post(): unexpected status 400 with
OData error: BadRequest: 1058: Unsupported control for B2C policies. Only
Block, Mfa, and MfaAndChangePassword grant controls are allowed.
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: