Skip to content

Commit

Permalink
Added AADIdentityB2XUserFlow resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ritikmit committed Oct 21, 2024
1 parent 6d694db commit e03bf7e
Show file tree
Hide file tree
Showing 9 changed files with 2,054 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[ClassVersion("1.0.0")]
class MSFT_MicrosoftGraphUserFlowApiConnectorConfiguration
{
[Write, Description("The name of the connector used for post federation signup step.")] String postFederationSignupConnectorName;
[Write, Description("The name of the connector used for post attribute collection step.")] String postAttributeCollectionConnectorName;
};

[ClassVersion("1.0.0")]
class MSFT_MicrosoftGraphuserFlowUserAttributeAssignmentUserAttributeValues
{
[Write, Description("The display name of the property displayed to the end user in the user flow.")] String Name;
[Write, Description("The value that is set when this item is selected.")] String Value;
[Write, Description("Used to set the value as the default.")] Boolean IsDefault;
};

[ClassVersion("1.0.0")]
class MSFT_MicrosoftGraphuserFlowUserAttributeAssignment
{
[Write, Description("The unique identifier of identityUserFlowAttributeAssignment.")] String Id;
[Write, Description("The display name of the identityUserFlowAttribute within a user flow.")] String DisplayName;
[Write, Description("Determines whether the identityUserFlowAttribute is optional.")] Boolean IsOptional;
[Write, Description("User Flow Attribute Input Type."), ValueMap{"textBox","dateTimeDropdown","radioSingleSelect","dropdownSingleSelect","emailBox","checkboxMultiSelect"}, Values{"textBox","dateTimeDropdown","radioSingleSelect","dropdownSingleSelect","emailBox","checkboxMultiSelect"}] String UserInputType;
[Write, Description("The list of user attribute values for this assignment."), EmbeddedInstance("MSFT_MicrosoftGraphuserFlowUserAttributeAssignmentUserAttributeValues")] String UserAttributeValues[];
};

[ClassVersion("1.0.0.0"), FriendlyName("AADIdentityB2XUserFlow")]
class MSFT_AADIdentityB2XUserFlow : OMI_BaseResource
{
[Write, Description("Configuration for enabling an API connector for use as part of the self-service sign-up user flow. You can only obtain the value of this object using Get userFlowApiConnectorConfiguration."), EmbeddedInstance("MSFT_MicrosoftGraphuserFlowApiConnectorConfiguration")] String ApiConnectorConfiguration;
[Key, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("The identity providers included in the user flow.")] String IdentityProviders[];
[Write, Description("The user attribute assignments included in the user flow."), EmbeddedInstance("MSFT_MicrosoftGraphuserFlowUserAttributeAssignment")] String UserAttributeAssignments[];
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
[Write, Description("Secret of the Azure Active Directory tenant used for authentication."), EmbeddedInstance("MSFT_Credential")] String ApplicationSecret;
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint;
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
[Write, Description("Access token used for authentication.")] String AccessTokens[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# AADIdentityB2XUserFlow

## Description

Azure AD Identity B2 X User Flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"resourceName": "AADIdentityB2XUserFlow",
"description": "This resource configures an Azure AD Identity B2 X User Flow.",
"permissions": {
"graph": {
"delegated": {
"read": [
{
"name": "IdentityUserFlow.Read.All"
}
],
"update": [

]
},
"application": {
"read": [
{
"name": "IdentityUserFlow.Read.All"
}
],
"update": [

]
}
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<#
This example is used to test new resources and showcase the usage of new resources being worked on.
It is not meant to use as a production baseline.
#>

Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
AADIdentityB2XUserFlow "AADIdentityB2XUserFlow-B2X_1_TestFlow"
{
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ApiConnectorConfiguration = MSFT_MicrosoftGraphuserFlowApiConnectorConfiguration
{
postAttributeCollectionConnectorId = 'RestApi_f6e8e73d-6b17-433e-948f-f578f12bd57c'
postFederationSignupConnectorId = 'RestApi_beeb7152-673c-48b3-b143-9975949a93ca'
};
Credential = $Credscredential;
Ensure = "Present";
Id = "B2X_1_TestFlow";
IdentityProviders = @("MSASignup-OAUTH","EmailOtpSignup-OAUTH");
UserAttributeAssignments = @(
MSFT_MicrosoftGraphuserFlowUserAttributeAssignment
{
UserInputType = 'textBox'
IsOptional = $True
DisplayName = 'Email Address'
Id = 'emailReadonly'

}
MSFT_MicrosoftGraphuserFlowUserAttributeAssignment
{
UserInputType = 'dropdownSingleSelect'
IsOptional = $True
DisplayName = 'Random'
Id = 'city'
UserAttributeValues = @(
MSFT_MicrosoftGraphuserFlowUserAttributeAssignmentUserAttributeValues
{
IsDefault = $True
Name = 'S'
Value = '2'
}
MSFT_MicrosoftGraphuserFlowUserAttributeAssignmentUserAttributeValues
{
IsDefault = $True
Name = 'X'
Value = '1'
}
)
}
MSFT_MicrosoftGraphuserFlowUserAttributeAssignment{
UserInputType = 'textBox'
IsOptional = $False
DisplayName = 'Piyush1'
Id = 'extension_91d51274096941f786b07b9d723d93f4_Piyush1'

}
);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<#
This example is used to test new resources and showcase the usage of new resources being worked on.
It is not meant to use as a production baseline.
#>

Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
AADIdentityB2XUserFlow "AADIdentityB2XUserFlow-B2X_1_TestFlow"
{
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ApiConnectorConfiguration = MSFT_MicrosoftGraphuserFlowApiConnectorConfiguration
{
postAttributeCollectionConnectorId = 'RestApi_f6e8e73d-6b17-433e-948f-f578f12bd57c'
postFederationSignupConnectorId = 'RestApi_beeb7152-673c-48b3-b143-9975949a93ca'
};
Credential = $Credscredential;
Ensure = "Present";
Id = "B2X_1_TestFlow";
IdentityProviders = @("MSASignup-OAUTH","EmailOtpSignup-OAUTH");
UserAttributeAssignments = @(
MSFT_MicrosoftGraphuserFlowUserAttributeAssignment
{
UserInputType = 'textBox'
IsOptional = $True
DisplayName = 'Email Address'
Id = 'emailReadonly'

}
MSFT_MicrosoftGraphuserFlowUserAttributeAssignment
{
UserInputType = 'dropdownSingleSelect'
IsOptional = $True
DisplayName = 'Random'
Id = 'city'
UserAttributeValues = @(
MSFT_MicrosoftGraphuserFlowUserAttributeAssignmentUserAttributeValues
{
IsDefault = $True
Name = 'S'
Value = '2'
}
MSFT_MicrosoftGraphuserFlowUserAttributeAssignmentUserAttributeValues
{
IsDefault = $True
Name = 'X'
Value = '1'
}
)
}
MSFT_MicrosoftGraphuserFlowUserAttributeAssignment{
UserInputType = 'textBox'
IsOptional = $False
DisplayName = 'Piyush1'
Id = 'extension_91d51274096941f786b07b9d723d93f4_Piyush1'

}
);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<#
This example is used to test new resources and showcase the usage of new resources being worked on.
It is not meant to use as a production baseline.
#>

Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
AADIdentityB2XUserFlow "AADIdentityB2XUserFlow-B2X_1_TestFlow"
{
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
Id = "B2X_1_TestFlow";
}
}
}
Loading

0 comments on commit e03bf7e

Please sign in to comment.