Skip to content

Commit 693685d

Browse files
committed
Reverts
1 parent dba655f commit 693685d

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

module/Entra/Microsoft.Entra/Governance/Set-EntraAppRoleToApplicationUser.ps1

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ function Set-EntraAppRoleToApplicationUser {
99
HelpMessage = "Specify the data source type: 'DatabaseorDirectory', 'SAPCloudIdentity', or 'Generic' which determines the column attribute mapping.",
1010
ParameterSetName = 'Default')]
1111
[Parameter(Mandatory = $true, ParameterSetName = 'ExportResults')]
12-
[Parameter(Mandatory = $true, ParameterSetName = 'ValidateAction')]
1312
[ValidateSet("DatabaseorDirectory", "SAPCloudIdentity", "Generic")]
1413
[string]$DataSource,
1514

1615
[Parameter(Mandatory = $true,
1716
HelpMessage = "Path to the input file containing users, e.g., C:\temp\users.csv",
1817
ParameterSetName = 'Default')]
1918
[Parameter(Mandatory = $true, ParameterSetName = 'ExportResults')]
20-
[Parameter(Mandatory = $true, ParameterSetName = 'ValidateAction')]
2119
[ValidateNotNullOrEmpty()]
2220
[ValidateScript({ Test-Path $_ })]
2321
[System.IO.FileInfo]$FileName,
@@ -26,7 +24,6 @@ function Set-EntraAppRoleToApplicationUser {
2624
HelpMessage = "Name of the application (Service Principal) to assign roles for",
2725
ParameterSetName = 'Default')]
2826
[Parameter(Mandatory = $true, ParameterSetName = 'ExportResults')]
29-
[Parameter(Mandatory = $true, ParameterSetName = 'ValidateAction')]
3027
[ValidateNotNullOrEmpty()]
3128
[string]$ApplicationName,
3229

@@ -37,10 +34,7 @@ function Set-EntraAppRoleToApplicationUser {
3734

3835
[Parameter(Mandatory = $false, ParameterSetName = 'ExportResults',
3936
HelpMessage = "Path for the export file. Defaults to current directory.")]
40-
[System.IO.FileInfo]$ExportFileName = (Join-Path (Get-Location) "EntraAppRoleAssignments_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv"),
41-
42-
[Parameter(Mandatory = $false, ParameterSetName = 'ValidateAction')]
43-
[switch]$Validate
37+
[System.IO.FileInfo]$ExportFileName = (Join-Path (Get-Location) "EntraAppRoleAssignments_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv")
4438
)
4539

4640
process {
@@ -136,7 +130,6 @@ function Set-EntraAppRoleToApplicationUser {
136130
}
137131

138132
$newApp = New-EntraApplication @appParams
139-
$validationStatus += "New application will be created with displayName - '$DisplayName'"
140133
Write-ColoredVerbose "Created new application: $DisplayName"
141134

142135
# Create service principal for the application
@@ -327,7 +320,6 @@ function Set-EntraAppRoleToApplicationUser {
327320
function StartOrchestration {
328321

329322
try {
330-
$validationStatus = @()
331323
# Import users from the CSV file
332324
Write-ColoredVerbose "Importing users from file: $FileName" -Color "Cyan"
333325
$users = Import-Csv -Path $FileName

0 commit comments

Comments
 (0)