Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
3c81d41
App segment management
andres-canello Jul 17, 2024
ea75e4f
Update Get-EntraBetaPrivateAccessApplicationSegment.md
andres-canello Jul 18, 2024
6845a90
More docs
andres-canello Jul 18, 2024
9b0d98e
Merge branch 'main' into main
rtintor Jul 19, 2024
3ed5c87
Merge branch 'main' into main
SteveMutungi254 Jul 23, 2024
d7b5be0
Docs update - formatting
SteveMutungi254 Jul 23, 2024
9329586
Merge pull request #1 from SteveMutungi254/main
andres-canello Jul 25, 2024
1e5054c
Update New-EntraBetaPrivateAccessApplicationSegment.md
andres-canello Jul 25, 2024
4cb0ac4
App segment management
andres-canello Jul 17, 2024
e268cba
Update Get-EntraBetaPrivateAccessApplicationSegment.md
andres-canello Jul 18, 2024
f66f23f
More docs
andres-canello Jul 18, 2024
9cdce00
Docs update - formatting
SteveMutungi254 Jul 23, 2024
7dd0ec6
Update New-EntraBetaPrivateAccessApplicationSegment.md
andres-canello Jul 25, 2024
335f3cb
Merge branch 'main' of https://github.com/andres-canello/entra-powers…
andres-canello Jul 26, 2024
d0f51fc
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/G…
andres-canello Jul 26, 2024
a935f1c
Apply suggestions from code review
andres-canello Jul 26, 2024
1bae8c5
Merge branch 'main' into main
SteveMutungi254 Jul 26, 2024
26e2bcb
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/G…
SteveMutungi254 Jul 26, 2024
a56ab5d
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/N…
SteveMutungi254 Jul 26, 2024
cbba699
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/R…
SteveMutungi254 Jul 26, 2024
9bbda17
Merge branch 'main' of https://github.com/andres-canello/entra-powers…
andres-canello Jul 26, 2024
a7cbea4
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/G…
SteveMutungi254 Jul 26, 2024
9b0676d
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/G…
SteveMutungi254 Jul 26, 2024
b0c6b3f
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/G…
SteveMutungi254 Jul 26, 2024
0cb78d7
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/N…
SteveMutungi254 Jul 26, 2024
e159885
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/N…
SteveMutungi254 Jul 26, 2024
32fa4c6
Update module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/R…
SteveMutungi254 Jul 26, 2024
629b5f7
GSA commands
andres-canello Aug 1, 2024
ca9fdac
Merge branch 'main' into main
SteveMutungi254 Aug 6, 2024
bb15989
Merge remote-tracking branch 'upstream/main'
andres-canello Oct 19, 2024
d3b8d78
New commands
andres-canello Oct 20, 2024
3ab9365
Fixing example build error
SteveMutungi254 Oct 24, 2024
1bf6471
Fixing Onboarding example resulting in build errors
SteveMutungi254 Oct 24, 2024
d1f1747
Formatting response output
SteveMutungi254 Oct 24, 2024
cf27ac4
Restoring original scopes
SteveMutungi254 Oct 24, 2024
e68ce8e
Enriching example description.
SteveMutungi254 Oct 24, 2024
1d2df6e
Removing trailing spaces
SteveMutungi254 Oct 24, 2024
dd78925
Adding status options.
SteveMutungi254 Oct 24, 2024
a7ec687
Removing trailing spaces
SteveMutungi254 Oct 24, 2024
51dc1a1
Adding scopes
SteveMutungi254 Oct 24, 2024
64124d4
Formatting outputs
SteveMutungi254 Oct 24, 2024
2335623
Proposing use of ApplicationId instead of ObjectId
SteveMutungi254 Oct 24, 2024
80d8f66
Get-EntraBetaPrivateAccessApplication example improvements
SteveMutungi254 Oct 24, 2024
18cd3b6
Adding an alias
SteveMutungi254 Oct 24, 2024
1102b74
Adding documentation alias
SteveMutungi254 Oct 24, 2024
45930e3
Renaming cmdlet name to Enable-EntraBetaGlobalSecureAccessTenant
SteveMutungi254 Oct 24, 2024
4ad7512
Merge pull request #2 from SteveMutungi254/main
andres-canello Oct 25, 2024
2085047
Update New-EntraBetaPrivateAccessApplication.ps1
andres-canello Oct 25, 2024
23704c1
Enriching examples and formatting to boost quality.
SteveMutungi254 Oct 25, 2024
7c9bdc2
Merge pull request #3 from SteveMutungi254/main
andres-canello Oct 25, 2024
0bc3a52
Merge branch 'main' into main
SteveMutungi254 Oct 29, 2024
322349a
Update module/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSec…
SteveMutungi254 Oct 31, 2024
36f41e6
Update module/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSec…
SteveMutungi254 Oct 31, 2024
7613e20
Update module/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSec…
SteveMutungi254 Oct 31, 2024
72252c5
Applying PowerShell formatting
SteveMutungi254 Oct 31, 2024
49a9200
Applying PowerShell formatting for Get-EntraBetaGlobalSecureAccessTen…
SteveMutungi254 Oct 31, 2024
dfc752e
Applying PowerShell formatting Enable-EntraBetaGlobalSecureAccessTenant
SteveMutungi254 Oct 31, 2024
daa365d
Applying PowerShell formatting Get-EntraBetaPrivateAccessApplication
SteveMutungi254 Oct 31, 2024
9eba0cd
Applying PowerShell formatting for New-EntraBetaPrivateAccessApplication
SteveMutungi254 Oct 31, 2024
0f5ea66
Merge branch 'main' into main
SteveMutungi254 Oct 31, 2024
61de817
Merge branch 'main' into main
KenitoInc Oct 31, 2024
890d7ec
Updating date
SteveMutungi254 Oct 31, 2024
f19d358
Formatting changes
KenitoInc Oct 31, 2024
7f8fd92
Update name
KenitoInc Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All Rights Reserved.
# Licensed under the MIT License. See License in the project root for license information.
# ------------------------------------------------------------------------------

function Enable-EntraBetaGlobalSecureAccessTenant {
PROCESS {
$customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand
$response = Invoke-GraphRequest -Method POST -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/microsoft.graph.networkaccess.onboard"
$response
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All Rights Reserved.
# Licensed under the MIT License. See License in the project root for license information.
# ------------------------------------------------------------------------------

function Get-EntraBetaGlobalSecureAccessTenantStatus {
PROCESS {
$customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand
$response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/tenantStatus"
$response
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All Rights Reserved.
# Licensed under the MIT License. See License in the project root for license information.
# ------------------------------------------------------------------------------

function Get-EntraBetaPrivateAccessApplication {

[CmdletBinding(DefaultParameterSetName = 'AllPrivateAccessApps')]
param (
[Alias("ObjectId")]
[Parameter(Mandatory = $True, Position = 1, ParameterSetName = 'SingleAppID')]
[string]
$ApplicationId,

[Parameter(Mandatory = $False, ParameterSetName = 'SingleAppName')]
[string]
$ApplicationName
)

PROCESS {
$customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand

switch ($PSCmdlet.ParameterSetName) {
"AllPrivateAccessApps" {
$response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri 'https://graph.microsoft.com/beta/applications?$count=true&$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&$filter=tags/Any(x: x eq ''PrivateAccessNonWebApplication'') or tags/Any(x: x eq ''NetworkAccessManagedApplication'') or tags/Any(x: x eq ''NetworkAccessQuickAccessApplication'')'
$response.value
break
}
"SingleAppID" {
Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/?`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames"
break
}
"SingleAppName" {
$response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications?`$count=true&`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&`$filter=DisplayName eq '$ApplicationName'"
$response.value
break
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
# ------------------------------------------------------------------------------

function Get-EntraBetaPrivateAccessApplicationSegment {

[CmdletBinding(DefaultParameterSetName = 'AllApplicationSegments')]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All Rights Reserved.
# Licensed under the MIT License. See License in the project root for license information.
# ------------------------------------------------------------------------------

function New-EntraBetaPrivateAccessApplication {

[CmdletBinding(DefaultParameterSetName = 'AllPrivateAccessApps')]
param (
[Parameter(Mandatory = $True, Position = 1)]
[string]
$ApplicationName,

[Parameter(Mandatory = $False, Position = 2)]
[string]
$ConnectorGroupId
)

PROCESS {
$customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand

$bodyJson = @{ displayName = $ApplicationName } | ConvertTo-Json -Depth 99 -Compress

# Instantiate the Private Access app
try {
$newApp = Invoke-GraphRequest -Method POST -Headers $customHeaders -Uri 'https://graph.microsoft.com/beta/applicationTemplates/8adf8e6e-67b2-4cf2-a259-e3dc5476c621/instantiate' -Body $bodyJson
}
catch {
Write-Error "Failed to create the Private Access app. Error: $_"
return
}

$bodyJson = @{
"onPremisesPublishing" = @{
"applicationType" = "nonwebapp"
"isAccessibleViaZTNAClient" = $true
}
} | ConvertTo-Json -Depth 99 -Compress

$newAppId = $newApp.application.objectId

# Set the Private Access app to be accessible via the ZTNA client
$params = @{
Method = 'PATCH'
Uri = "https://graph.microsoft.com/beta/applications/$newAppId/"
Body = $bodyJson
}

Invoke-GraphRequest @params

# If ConnectorGroupId has been specified, assign the connector group to the app, otherwise the default connector group will be assigned.
if ($ConnectorGroupId) {
$bodyJson = @{
"@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationproxy/connectorGroups/$ConnectorGroupId"
} | ConvertTo-Json -Depth 99 -Compress

$params = @{
Method = 'PUT'
Uri = "https://graph.microsoft.com/beta/applications/$newAppId/connectorGroup/`$ref"
Body = $bodyJson
}

Invoke-GraphRequest @params
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Enable-EntraBetaGlobalSecureAccessTenant
description: This article provides details on the Enable-EntraBetaGlobalSecureAccessTenant command.

ms.topic: reference
ms.date: 10/31/2024
ms.author: eunicewaweru
ms.reviewer: stevemutungi
manager: CelesteDG
author: andres-canello
external help file: Microsoft.Graph.Entra.Beta-Help.xml
Module Name: Microsoft.Graph.Entra.Beta
online version:
schema: 2.0.0
---

# Enable-EntraBetaGlobalSecureAccessTenant

## Synopsis

Onboard the Global Secure Access service in the tenant.

## Description

The `Enable-EntraBetaGlobalSecureAccessTenant` cmdlet onboards the Global Secure Access service in the tenant.

In delegated scenarios with work or school accounts, the signed-in user needs a supported Microsoft Entra role or a custom role with the necessary permissions:

- Global Secure Access Administrator
- Security Administrator

## Examples

### Example 1: Enable Global Secure Access for a tenant

```powershell
Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All'
Enable-EntraBetaGlobalSecureAccessTenant
```

```Output
@odata.context : https://graph.microsoft.com/beta/$metadata#networkAccess/tenantStatus/$entity
onboardingStatus : onboarded
onboardingErrorMessage :
```

This command onboards the Global Secure Access service in the tenant.

### CommonParameters

This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## Inputs

### System.String

System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\]

## Outputs

### System.Object

## Notes

## RELATED LINKS

[Get-EntraBetaGlobalSecureAccessTenantStatus](Get-EntraBetaGlobalSecureAccessTenantStatus.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Get-EntraBetaGlobalSecureAccessTenantStatus
description: This article provides details on the Get-EntraBetaGlobalSecureAccessTenantStatus command.

ms.topic: reference
ms.date: 10/19/2024
ms.author: eunicewaweru
ms.reviewer: stevemutungi
manager: CelesteDG
author: andres-canello
external help file: Microsoft.Graph.Entra.Beta-Help.xml
Module Name: Microsoft.Graph.Entra.Beta
online version:
schema: 2.0.0
---

# Get-EntraBetaGlobalSecureAccessTenantStatus

## Synopsis

Retrieves the onboarding status of the Global Secure Access service in the tenant.

## Description

The `Get-EntraBetaGlobalSecureAccessTenantStatus` cmdlet retrieves the onboarding status of the Global Secure Access service in the tenant.

For delegated scenarios involving work or school accounts, the signed-in user must have either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation:

- Global Reader
- Global Secure Access Administrator
- Security Administrator

## Examples

### Example 1: Check Global Secure Access status for the tenant

```powershell
Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All'
Get-EntraBetaGlobalSecureAccessTenantStatus
```

```Output
@odata.context onboardingStatus onboardingErrorMessage
-------------- ---------------- ----------------------
https://graph.microsoft.com/beta/$metadata#networkAccess/tenantStatus/$entity offboarded
```

This command checks if the Global Secure Access service is activated in the tenant.

If the status is `offboarded`, you can activate the service with `New-EntraBetaGlobalSecureAccessTenant`.

The onboarding status can be: `offboarded`, `offboarding in progress`, `onboarding in progress`, `onboarded`, `onboarding error`, or `offboarding error`.

### CommonParameters

This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## Inputs

### System.String

System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\]

## Outputs

### System.Object

## Notes

## RELATED LINKS

[Get-EntraBetaApplication](Get-EntraBetaApplication.md)

[Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md)

[Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md)

[New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md)
Loading