# GlobalSecureAccess.ps
==============================================================
NOTE: I'm implementing the commands in this module into Microsoft's Entra PowerShell Beta module https://learn.microsoft.com/en-us/powershell/entra-powershell/installation \ Once I finish, I'll flag this module as deprecated.\ These are the commands already implemented in Entra PS Beta:\ \ Get-GSAPrivateAccessAppNetworkSegment -> Get-EntraBetaPrivateAccessApplicationSegment\ New-GSAPrivateAccessAppNetworkSegment -> New-EntraBetaPrivateAccessApplicationSegment\ Remove-GSAPrivateAccessAppNetworkSegment -> Remove-EntraBetaPrivateAccessApplicationSegment\
==============================================================
This is a community-supported PowerShell module which simplifies managing Entra Private Access apps. The module calls the Graph API endpoints to perform common operations. Please contribute and report issues.
Here are some commands to try:
Import-Module "C:\Git\GlobalSecureAccess.ps\GlobalSecureAccess.ps\GlobalSecureAccess.ps.psm1"
Connect-GSATenant
Get-GSAPrivateAccessApp
Get-GSAPrivateAccessApp -ObjectID 6e8e602b-466e-446c-99fa-ac4151748628
Get-GSAPrivateAccessAppNetworkSegment -ObjectID 6e8e602b-466e-446c-99fa-ac4151748628
Get-GSAPrivateAccessAppNetworkSegment 6e8e602b-466e-446c-99fa-ac4151748628 -NetworkSegmentID 05b319f5-1e5b-48f3-95b4-f78cf010fdbf
Get-GSAPrivateAccessApp 6e8e602b-466e-446c-99fa-ac4151748628 | Get-GSAPrivateAccessAppNetworkSegment
Get-GSAPrivateAccessApp 6e8e602b-466e-446c-99fa-ac4151748628 | New-GSAPrivateAccessAppNetworkSegment -DestinationHost ssh.contoso.net -Ports 22 -Protocol tcp
Get-GSAPrivateAccessApp 58c59e74-5b92-4578-bef5-36b86ac97f0a | New-GSAPrivateAccessAppNetworkSegment -Ports 10000-16000 -Protocol tcp,udp -DestinationHost 192.168.1.100..192.168.1.101 -DestinationType ipRange
Remove-GSAPrivateAccessAppNetworkSegment -ObjectID 6e8e602b-466e-446c-99fa-ac4151748628 -NetworkSegmentID 6e8e602b-466e-446c-99fa-ac4151748611
Get-GSAConnector -ConnectorID '00000000-0000-0000-0000-000000000000'
Get-GSAConnector -ConnectorGroupID '00000000-0000-0000-0000-000000000000'
Get-GSAConnectorGroup
Example: ...
$userId = "<Your user's ID>"
$app_name = "<Your App's display name>"
$app_role_name = "
$params = @{ "PrincipalId" =$userId "ResourceId" =$sp.Id "AppRoleId" =($sp.AppRoles | Where-Object { $_.DisplayName -eq $app_role_name }).Id }
New-MgUserAppRoleAssignment -UserId $userId -BodyParameter $params | Format-List Id, AppRoleId, CreationTime, PrincipalDisplayName, PrincipalId, PrincipalType, ResourceDisplayName, ResourceId ...