microsoftgraph / microsoftgraph/entra-powershell

🙏 Allow Conditional Access Authentication Strength

Open
#1,378 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Investigating ToTriage
Dominant language
PowerShell
Stars
213
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Entra PowerShell Command New-EntraConditionalAccessPolicy does not allow including Authentication Strength in Conditional Access Policy.

Describe the feature

Using the following Json we can create conditional Access policy using the Graph Endpoint. However we cannot do the same using Entra Powershell.

{
  "displayName": "Policy with Auth strength",
  "state": "enabledForReportingButNotEnforced",
  "conditions": {
    "clientAppTypes": [
      "all"
    ],
    "applications": {
      "includeApplications": [
        "All"
      ]
    },
    "users": {
      "includeUsers": [
        "All"
      ]
    }
  },
  "grantControls": {
    "operator": "OR",
    "authenticationStrength": {
      "id": "00000000-0000-0000-0000-000000000002"
    }
  }
}
$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls
$controls._Operator = 'OR'
$controls.BuiltInControls = @()
$controls.CustomAuthenticationFactors = @()
$controls.TermsOfUse = @()


# Create authentication strength object for phishing-resistant MFA
$authStrength = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthenticationStrengthPolicy
$authStrength.Id = '00000000-0000-0000-0000-000000000004' # Phishing-resistant MFA

$controls.authenticationStrength = $authStrength

Error : InvalidOperation:
Line |
12 | $controls.authenticationStrength = $authStrength
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The property 'authenticationStrength' cannot be found on this object. Verify that the property exists and can be set.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the New-EntraConditionalAccessPolicy command and compare its grant-controls object with the Graph JSON shown in the issue. Verify that authenticationStrength can be supplied for the phishing-resistant MFA policy, then confirm the command creates the equivalent Conditional Access policy through the Graph endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
authentication, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.