Skip to content

Commit ece21ba

Browse files
update tests del UPN
2 parents d3c0713 + 17109ed commit ece21ba

File tree

52 files changed

+299
-447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+299
-447
lines changed

module/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplicationSegment.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ function Get-EntraBetaPrivateAccessApplicationSegment {
55

66
[CmdletBinding(DefaultParameterSetName = 'AllApplicationSegments')]
77
param (
8-
[Alias('id')]
8+
[Alias('ObjectId')]
99
[Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
1010
[string]
11-
$ObjectId,
11+
$ApplicationId,
1212
[Parameter(Mandatory = $False, Position = 2, ParameterSetName = 'SingleApplicationSegment')]
1313
[string]
1414
$ApplicationSegmentId
@@ -18,12 +18,12 @@ function Get-EntraBetaPrivateAccessApplicationSegment {
1818
$customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand
1919
switch ($PSCmdlet.ParameterSetName) {
2020
"AllApplicationSegments" {
21-
$response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments"
21+
$response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments"
2222
$response.value
2323
break
2424
}
2525
"SingleApplicationSegment" {
26-
Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId"
26+
Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId"
2727
break
2828
}
2929
}

module/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplicationSegment.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ function New-EntraBetaPrivateAccessApplicationSegment {
66
[CmdletBinding()]
77
param (
88

9-
[Alias('id')]
9+
[Alias('ObjectId')]
1010
[Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
1111
[string]
12-
$ObjectID,
12+
$ApplicationId,
1313

1414
[Parameter(Mandatory = $True)]
1515
[string]
@@ -71,7 +71,7 @@ function New-EntraBetaPrivateAccessApplicationSegment {
7171

7272
$params = @{
7373
Method = 'POST'
74-
Uri = "https://graph.microsoft.com/beta/applications/$ObjectID/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/"
74+
Uri = "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/"
7575
Headers = $customHeaders
7676
Body = $bodyJson
7777
OutputType = 'PSObject'

module/EntraBeta/AdditionalFunctions/Remove-EntraBetaPrivateAccessApplicationSegment.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ function Remove-EntraBetaPrivateAccessApplicationSegment {
55

66
[CmdletBinding()]
77
param (
8+
[Alias('ObjectId')]
89
[Parameter(Mandatory = $True, Position = 1)]
910
[string]
10-
$ObjectID,
11+
$ApplicationId,
1112
[Parameter(Mandatory = $False, Position = 2)]
1213
[string]
1314
$ApplicationSegmentId
1415
)
1516

1617
PROCESS {
1718
$customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand
18-
Invoke-GraphRequest -Method DELETE -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectID/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId"
19+
Invoke-GraphRequest -Method DELETE -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId"
1920
}
2021
}

module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContract.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,7 @@ Get-EntraBetaContract
5050

5151
The `Get-EntraBetaContract` cmdlet gets a contract information associated to a partner tenant.
5252

53-
The contract object contains the following attributes:
54-
55-
- `contractType` - type of the contract.
56-
57-
Possible values are:
58-
59-
1. SyndicationPartner - indicates a partner that exclusively resells and manages O365 and Intune for this customer.
60-
They resell and support their customers.
61-
1. BreadthPartner - indicates that the partner has the ability to provide administrative support for this customer.
62-
However the partner isn't allowed to resell to the customer.
63-
1. ResellerPartner - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners.
64-
65-
- `customerContextId` - unique identifier for the customer tenant referenced by this partnership.
66-
67-
Corresponds to the ObjectId property of the customer tenant's TenantDetail object.
68-
69-
- `defaultDomainName` - a copy of the customer tenant's default domain name.
70-
The copy is made when the partnership with the customer is established.
71-
It isn't automatically updated if the customer tenant's default domain name changes.
72-
73-
- `deletionTimestamp` - this property isn't valid for contracts and always returns null.
74-
75-
- `displayName` - a copy of the customer tenant's display name.
76-
The copy is made when the partnership with the customer is established.
77-
It isn't automatically updated if the customer tenant's display name changes.
78-
79-
- `objectType` - a string that identifies the object type. The value is always `Contract`.
80-
81-
- `ContractId` - the unique identifier for the partnership.
53+
In delegated scenarios with work or school accounts, the `Directory Readers` role is the only least privileged role that supports this operation for the signed-in user
8254

8355
## Examples
8456

@@ -193,4 +165,29 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
193165

194166
## Notes
195167

168+
The contract object contains the following attributes:
169+
170+
`contractType` - type of the contract.
171+
172+
Possible values are:
173+
174+
**SyndicationPartner** - indicates a partner that exclusively resells and manages O365 and Intune for this customer.
175+
They resell and support their customers.
176+
**BreadthPartner** - indicates that the partner has the ability to provide administrative support for this customer. However the partner isn't allowed to resell to the customer.
177+
**ResellerPartner** - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners.
178+
179+
`customerContextId` - unique identifier for the customer tenant referenced by this partnership.
180+
181+
Corresponds to the ObjectId property of the customer tenant's TenantDetail object.
182+
183+
`defaultDomainName` - a copy of the customer tenant's default domain name. The copy is made when the partnership with the customer is established. It isn't automatically updated if the customer tenant's default domain name changes.
184+
185+
`deletionTimestamp` - this property isn't valid for contracts and always returns null.
186+
187+
`displayName` - a copy of the customer tenant's display name. The copy is made when the partnership with the customer is established. It isn't automatically updated if the customer tenant's display name changes.
188+
189+
`objectType` - a string that identifies the object type. The value is always `Contract`.
190+
191+
`ContractId` - the unique identifier for the partnership.
192+
196193
## Related Links

module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncConfiguration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Get-EntraBetaDirSyncConfiguration
3333

3434
## Description
3535

36-
The `Get-EntraBetaDirSyncConfiguration` cmdlet gets the directory synchronization settings.
36+
The `Get-EntraBetaDirSyncConfiguration` cmdlet gets the directory synchronization settings. See [configuration settings](https://learn.microsoft.com/graph/api/resources/onpremisesaccidentaldeletionprevention#properties) details.
3737

3838
For delegated scenarios, the user needs to be assigned the Global Administrator role.
3939

@@ -58,7 +58,8 @@ This example gets directory synchronization settings.
5858

5959
```powershell
6060
Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All'
61-
Get-EntraBetaDirSyncConfiguration -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee'
61+
$tenant = Get-EntraBetaTenantDetail
62+
Get-EntraBetaDirSyncConfiguration -TenantId $tenant.Id
6263
```
6364

6465
```Output

module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncFeature.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ Get-EntraBetaDirSyncFeature
3434

3535
## Description
3636

37-
The `Get-EntraBetaDirSyncFeature` cmdlet checks the status of directory synchronization features for a tenant.
37+
The `Get-EntraBetaDirSyncFeature` cmdlet checks the status of directory sync features for a tenant. If no features are specified, it returns a list of all features and their enabled or disabled status.
38+
39+
For delegated scenarios, the user needs to be assigned the Global Administrator role.
3840

3941
Some of the features that can be used with this cmdlet include:
4042

@@ -48,9 +50,7 @@ Some of the features that can be used with this cmdlet include:
4850
- **UnifiedGroupWriteback**
4951
- **UserWriteback**
5052

51-
The cmdlet can be run without specifying any features, in which case it returns a list of all features and their enabled or disabled status.
52-
53-
For delegated scenarios, the user needs to be assigned the Global Administrator role.
53+
To view all supported features, see the [complete feature list](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature#properties).
5454

5555
## Examples
5656

@@ -124,7 +124,7 @@ Accept wildcard characters: False
124124
125125
### -Feature
126126
127-
The directory synchronization feature to check the status of.
127+
The directory sync feature to check. See the [complete feature list](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature#properties).
128128
129129
```yaml
130130
Type: System.String

module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb My Application #microsoft.graph.serviceP
7272
cccccccc-8888-9999-0000-dddddddddddd Contoso Group #microsoft.graph.group
7373
```
7474

75-
This example retrieves the members of a specified group by its `GroupId`.
75+
This example retrieves the members of a specified group by its `GroupId` and selects only the `Id`, `DisplayName` and `@odata.type` properties for each member.
7676

7777
- `-GroupId` specifies the ID of a group.
7878

@@ -133,7 +133,7 @@ bbbbbbbb-7777-8888-9999-cccccccccccc
133133

134134
This example demonstrates how to retrieve group member by ID.
135135

136-
- `-GroupId` specifies the ID of a group.
136+
- `-GroupId` Specifies the ID of a group.
137137

138138
## Parameters
139139

module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ The `Get-EntraBetaPrivateAccessApplicationSegment` cmdlet retrieves a list of al
3030

3131
```powershell
3232
Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All'
33-
$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq '<GlobalSecureAccess_Application_DisplayName>'").ObjectId
34-
Get-EntraBetaPrivateAccessApplicationSegment -ObjectId $ApplicationObjectId
33+
$application = Get-EntraBetaApplication -Filter "DisplayName eq '<GlobalSecureAccess_Application_DisplayName>'"
34+
Get-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id
3535
```
3636

3737
```Output
@@ -49,14 +49,9 @@ This command retrieves all application segments for an application.
4949

5050
```powershell
5151
Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All'
52-
$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq '<GlobalSecureAccess_Application_DisplayName>'").ObjectId
53-
54-
$params = @{
55-
ObjectId = $ApplicationObjectId
56-
ApplicationSegmentId = 'cccc2222-dd33-4444-55ee-666666ffffff'
57-
}
58-
59-
Get-EntraBetaPrivateAccessApplicationSegment @params
52+
$application = Get-EntraBetaApplication -Filter "DisplayName eq '<GlobalSecureAccess_Application_DisplayName>'"
53+
$applicationSegment = Get-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id | Where-Object {$_.destinationType -eq 'fqdn'}
54+
Get-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id -ApplicationSegmentId $applicationSegment.Id
6055
```
6156

6257
```Output
@@ -72,14 +67,14 @@ This example demonstrates how to retrieve information for a specific application
7267

7368
## Parameters
7469

75-
### -ObjectId
70+
### -ApplicationId
7671

7772
The Object ID of a Private Access application object.
7873

7974
```yaml
8075
Type: System.String
8176
Parameter Sets: AllApplicationSegments, SingleApplicationSegment
82-
Aliases: id
77+
Aliases: ObjectId
8378

8479
Required: True
8580
Position: 1
@@ -127,4 +122,3 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra
127122
[Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md)
128123

129124
[New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md)
130-

module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Get-EntraBetaTrustFrameworkPolicy
4747

4848
The `Get-EntraBetaTrustFrameworkPolicy` cmdlet retrieves the trust framework policies that have been created in the directory.
4949

50+
In delegated scenarios with work or school accounts, the admin must have a supported Microsoft Entra role or a custom role with the required permissions. The `B2C IEF Policy Administrator` is the least privileged role that supports this operation.
51+
5052
## Examples
5153

5254
### Example 1: Retrieves the list of all trust framework policies in the directory

module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ In this example, we retrieve all users whose MailNickname starts with Ada.
146146

147147
```powershell
148148
Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All'
149-
Get-EntraBetaUser -UserId '[email protected]' -Property 'SignInActivity' | Select-Object -ExpandProperty 'SignInActivity'
149+
Get-EntraBetaUser -UserId '[email protected]' -Property 'SignInActivity' | Select-Object -Property Id, DisplayName, UserPrincipalName -ExpandProperty 'SignInActivity'
150150
```
151151

152152
```Output
@@ -156,6 +156,9 @@ lastSuccessfulSignInDateTime : 9/9/2024 1:12:13 PM
156156
lastNonInteractiveSignInDateTime : 9/9/2024 1:12:13 PM
157157
lastSuccessfulSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa
158158
lastSignInDateTime : 9/7/2024 9:15:41 AM
159+
id : aaaaaaaa-bbbb-cccc-1111-222222222222
160+
displayName : Sawyer Miller
161+
userPrincipalName : [email protected]
159162
```
160163

161164
This example demonstrates how to retrieve the SignInActivity of a specific user by selecting a property.

0 commit comments

Comments
 (0)