azuread.AuthenticationStrengthPolicy
Explore with Pulumi AI
Manages a Authentication Strength Policy within Azure Active Directory.
API Permissions
The following API permissions are required in order to use this resource.
When authenticated with a service principal, this resource requires the following application roles: Policy.ReadWrite.ConditionalAccess
and Policy.Read.All
When authenticated with a user principal, this resource requires one of the following directory roles: Conditional Access Administrator
or Global Administrator
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = new azuread.AuthenticationStrengthPolicy("example", {
displayName: "Example Authentication Strength Policy",
description: "Policy for demo purposes",
allowedCombinations: [
"fido2",
"password",
],
});
const example2 = new azuread.AuthenticationStrengthPolicy("example2", {
displayName: "Example Authentication Strength Policy",
description: "Policy for demo purposes with all possible combinations",
allowedCombinations: [
"fido2",
"password",
"deviceBasedPush",
"temporaryAccessPassOneTime",
"federatedMultiFactor",
"federatedSingleFactor",
"hardwareOath,federatedSingleFactor",
"microsoftAuthenticatorPush,federatedSingleFactor",
"password,hardwareOath",
"password,microsoftAuthenticatorPush",
"password,sms",
"password,softwareOath",
"password,voice",
"sms",
"sms,federatedSingleFactor",
"softwareOath,federatedSingleFactor",
"temporaryAccessPassMultiUse",
"voice,federatedSingleFactor",
"windowsHelloForBusiness",
"x509CertificateMultiFactor",
"x509CertificateSingleFactor",
],
});
import pulumi
import pulumi_azuread as azuread
example = azuread.AuthenticationStrengthPolicy("example",
display_name="Example Authentication Strength Policy",
description="Policy for demo purposes",
allowed_combinations=[
"fido2",
"password",
])
example2 = azuread.AuthenticationStrengthPolicy("example2",
display_name="Example Authentication Strength Policy",
description="Policy for demo purposes with all possible combinations",
allowed_combinations=[
"fido2",
"password",
"deviceBasedPush",
"temporaryAccessPassOneTime",
"federatedMultiFactor",
"federatedSingleFactor",
"hardwareOath,federatedSingleFactor",
"microsoftAuthenticatorPush,federatedSingleFactor",
"password,hardwareOath",
"password,microsoftAuthenticatorPush",
"password,sms",
"password,softwareOath",
"password,voice",
"sms",
"sms,federatedSingleFactor",
"softwareOath,federatedSingleFactor",
"temporaryAccessPassMultiUse",
"voice,federatedSingleFactor",
"windowsHelloForBusiness",
"x509CertificateMultiFactor",
"x509CertificateSingleFactor",
])
package main
import (
"github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azuread.NewAuthenticationStrengthPolicy(ctx, "example", &azuread.AuthenticationStrengthPolicyArgs{
DisplayName: pulumi.String("Example Authentication Strength Policy"),
Description: pulumi.String("Policy for demo purposes"),
AllowedCombinations: pulumi.StringArray{
pulumi.String("fido2"),
pulumi.String("password"),
},
})
if err != nil {
return err
}
_, err = azuread.NewAuthenticationStrengthPolicy(ctx, "example2", &azuread.AuthenticationStrengthPolicyArgs{
DisplayName: pulumi.String("Example Authentication Strength Policy"),
Description: pulumi.String("Policy for demo purposes with all possible combinations"),
AllowedCombinations: pulumi.StringArray{
pulumi.String("fido2"),
pulumi.String("password"),
pulumi.String("deviceBasedPush"),
pulumi.String("temporaryAccessPassOneTime"),
pulumi.String("federatedMultiFactor"),
pulumi.String("federatedSingleFactor"),
pulumi.String("hardwareOath,federatedSingleFactor"),
pulumi.String("microsoftAuthenticatorPush,federatedSingleFactor"),
pulumi.String("password,hardwareOath"),
pulumi.String("password,microsoftAuthenticatorPush"),
pulumi.String("password,sms"),
pulumi.String("password,softwareOath"),
pulumi.String("password,voice"),
pulumi.String("sms"),
pulumi.String("sms,federatedSingleFactor"),
pulumi.String("softwareOath,federatedSingleFactor"),
pulumi.String("temporaryAccessPassMultiUse"),
pulumi.String("voice,federatedSingleFactor"),
pulumi.String("windowsHelloForBusiness"),
pulumi.String("x509CertificateMultiFactor"),
pulumi.String("x509CertificateSingleFactor"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureAD = Pulumi.AzureAD;
return await Deployment.RunAsync(() =>
{
var example = new AzureAD.AuthenticationStrengthPolicy("example", new()
{
DisplayName = "Example Authentication Strength Policy",
Description = "Policy for demo purposes",
AllowedCombinations = new[]
{
"fido2",
"password",
},
});
var example2 = new AzureAD.AuthenticationStrengthPolicy("example2", new()
{
DisplayName = "Example Authentication Strength Policy",
Description = "Policy for demo purposes with all possible combinations",
AllowedCombinations = new[]
{
"fido2",
"password",
"deviceBasedPush",
"temporaryAccessPassOneTime",
"federatedMultiFactor",
"federatedSingleFactor",
"hardwareOath,federatedSingleFactor",
"microsoftAuthenticatorPush,federatedSingleFactor",
"password,hardwareOath",
"password,microsoftAuthenticatorPush",
"password,sms",
"password,softwareOath",
"password,voice",
"sms",
"sms,federatedSingleFactor",
"softwareOath,federatedSingleFactor",
"temporaryAccessPassMultiUse",
"voice,federatedSingleFactor",
"windowsHelloForBusiness",
"x509CertificateMultiFactor",
"x509CertificateSingleFactor",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AuthenticationStrengthPolicy;
import com.pulumi.azuread.AuthenticationStrengthPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new AuthenticationStrengthPolicy("example", AuthenticationStrengthPolicyArgs.builder()
.displayName("Example Authentication Strength Policy")
.description("Policy for demo purposes")
.allowedCombinations(
"fido2",
"password")
.build());
var example2 = new AuthenticationStrengthPolicy("example2", AuthenticationStrengthPolicyArgs.builder()
.displayName("Example Authentication Strength Policy")
.description("Policy for demo purposes with all possible combinations")
.allowedCombinations(
"fido2",
"password",
"deviceBasedPush",
"temporaryAccessPassOneTime",
"federatedMultiFactor",
"federatedSingleFactor",
"hardwareOath,federatedSingleFactor",
"microsoftAuthenticatorPush,federatedSingleFactor",
"password,hardwareOath",
"password,microsoftAuthenticatorPush",
"password,sms",
"password,softwareOath",
"password,voice",
"sms",
"sms,federatedSingleFactor",
"softwareOath,federatedSingleFactor",
"temporaryAccessPassMultiUse",
"voice,federatedSingleFactor",
"windowsHelloForBusiness",
"x509CertificateMultiFactor",
"x509CertificateSingleFactor")
.build());
}
}
resources:
example:
type: azuread:AuthenticationStrengthPolicy
properties:
displayName: Example Authentication Strength Policy
description: Policy for demo purposes
allowedCombinations:
- fido2
- password
example2:
type: azuread:AuthenticationStrengthPolicy
properties:
displayName: Example Authentication Strength Policy
description: Policy for demo purposes with all possible combinations
allowedCombinations:
- fido2
- password
- deviceBasedPush
- temporaryAccessPassOneTime
- federatedMultiFactor
- federatedSingleFactor
- hardwareOath,federatedSingleFactor
- microsoftAuthenticatorPush,federatedSingleFactor
- password,hardwareOath
- password,microsoftAuthenticatorPush
- password,sms
- password,softwareOath
- password,voice
- sms
- sms,federatedSingleFactor
- softwareOath,federatedSingleFactor
- temporaryAccessPassMultiUse
- voice,federatedSingleFactor
- windowsHelloForBusiness
- x509CertificateMultiFactor
- x509CertificateSingleFactor
Create AuthenticationStrengthPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AuthenticationStrengthPolicy(name: string, args: AuthenticationStrengthPolicyArgs, opts?: CustomResourceOptions);
@overload
def AuthenticationStrengthPolicy(resource_name: str,
args: AuthenticationStrengthPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AuthenticationStrengthPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_combinations: Optional[Sequence[str]] = None,
display_name: Optional[str] = None,
description: Optional[str] = None)
func NewAuthenticationStrengthPolicy(ctx *Context, name string, args AuthenticationStrengthPolicyArgs, opts ...ResourceOption) (*AuthenticationStrengthPolicy, error)
public AuthenticationStrengthPolicy(string name, AuthenticationStrengthPolicyArgs args, CustomResourceOptions? opts = null)
public AuthenticationStrengthPolicy(String name, AuthenticationStrengthPolicyArgs args)
public AuthenticationStrengthPolicy(String name, AuthenticationStrengthPolicyArgs args, CustomResourceOptions options)
type: azuread:AuthenticationStrengthPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AuthenticationStrengthPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AuthenticationStrengthPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AuthenticationStrengthPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthenticationStrengthPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AuthenticationStrengthPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var authenticationStrengthPolicyResource = new AzureAD.AuthenticationStrengthPolicy("authenticationStrengthPolicyResource", new()
{
AllowedCombinations = new[]
{
"string",
},
DisplayName = "string",
Description = "string",
});
example, err := azuread.NewAuthenticationStrengthPolicy(ctx, "authenticationStrengthPolicyResource", &azuread.AuthenticationStrengthPolicyArgs{
AllowedCombinations: pulumi.StringArray{
pulumi.String("string"),
},
DisplayName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var authenticationStrengthPolicyResource = new AuthenticationStrengthPolicy("authenticationStrengthPolicyResource", AuthenticationStrengthPolicyArgs.builder()
.allowedCombinations("string")
.displayName("string")
.description("string")
.build());
authentication_strength_policy_resource = azuread.AuthenticationStrengthPolicy("authenticationStrengthPolicyResource",
allowed_combinations=["string"],
display_name="string",
description="string")
const authenticationStrengthPolicyResource = new azuread.AuthenticationStrengthPolicy("authenticationStrengthPolicyResource", {
allowedCombinations: ["string"],
displayName: "string",
description: "string",
});
type: azuread:AuthenticationStrengthPolicy
properties:
allowedCombinations:
- string
description: string
displayName: string
AuthenticationStrengthPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AuthenticationStrengthPolicy resource accepts the following input properties:
- Allowed
Combinations List<string> - List of allowed authentication methods for this authentication strength policy.
- Display
Name string - The friendly name for this authentication strength policy.
- Description string
- The description for this authentication strength policy.
- Allowed
Combinations []string - List of allowed authentication methods for this authentication strength policy.
- Display
Name string - The friendly name for this authentication strength policy.
- Description string
- The description for this authentication strength policy.
- allowed
Combinations List<String> - List of allowed authentication methods for this authentication strength policy.
- display
Name String - The friendly name for this authentication strength policy.
- description String
- The description for this authentication strength policy.
- allowed
Combinations string[] - List of allowed authentication methods for this authentication strength policy.
- display
Name string - The friendly name for this authentication strength policy.
- description string
- The description for this authentication strength policy.
- allowed_
combinations Sequence[str] - List of allowed authentication methods for this authentication strength policy.
- display_
name str - The friendly name for this authentication strength policy.
- description str
- The description for this authentication strength policy.
- allowed
Combinations List<String> - List of allowed authentication methods for this authentication strength policy.
- display
Name String - The friendly name for this authentication strength policy.
- description String
- The description for this authentication strength policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the AuthenticationStrengthPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AuthenticationStrengthPolicy Resource
Get an existing AuthenticationStrengthPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AuthenticationStrengthPolicyState, opts?: CustomResourceOptions): AuthenticationStrengthPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_combinations: Optional[Sequence[str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None) -> AuthenticationStrengthPolicy
func GetAuthenticationStrengthPolicy(ctx *Context, name string, id IDInput, state *AuthenticationStrengthPolicyState, opts ...ResourceOption) (*AuthenticationStrengthPolicy, error)
public static AuthenticationStrengthPolicy Get(string name, Input<string> id, AuthenticationStrengthPolicyState? state, CustomResourceOptions? opts = null)
public static AuthenticationStrengthPolicy get(String name, Output<String> id, AuthenticationStrengthPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allowed
Combinations List<string> - List of allowed authentication methods for this authentication strength policy.
- Description string
- The description for this authentication strength policy.
- Display
Name string - The friendly name for this authentication strength policy.
- Allowed
Combinations []string - List of allowed authentication methods for this authentication strength policy.
- Description string
- The description for this authentication strength policy.
- Display
Name string - The friendly name for this authentication strength policy.
- allowed
Combinations List<String> - List of allowed authentication methods for this authentication strength policy.
- description String
- The description for this authentication strength policy.
- display
Name String - The friendly name for this authentication strength policy.
- allowed
Combinations string[] - List of allowed authentication methods for this authentication strength policy.
- description string
- The description for this authentication strength policy.
- display
Name string - The friendly name for this authentication strength policy.
- allowed_
combinations Sequence[str] - List of allowed authentication methods for this authentication strength policy.
- description str
- The description for this authentication strength policy.
- display_
name str - The friendly name for this authentication strength policy.
- allowed
Combinations List<String> - List of allowed authentication methods for this authentication strength policy.
- description String
- The description for this authentication strength policy.
- display
Name String - The friendly name for this authentication strength policy.
Import
Authentication Strength Policies can be imported using the id
, e.g.
$ pulumi import azuread:index/authenticationStrengthPolicy:AuthenticationStrengthPolicy my_policy 00000000-0000-0000-0000-000000000000
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Active Directory (Azure AD) pulumi/pulumi-azuread
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuread
Terraform Provider.