Skip to content

Commit 2b8a14f

Browse files
Add scopes - batch 1 for Entra PowerShell cmdlets (#895)
1 parent 8460ea0 commit 2b8a14f

25 files changed

+744
-260
lines changed

module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraEnvironment.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Adds Microsoft Entra environment to the settings file.
2323

2424
## Syntax
2525

26-
2726
### Add Entra Environment Name
2827

2928
```powershell
@@ -46,13 +45,22 @@ Adds Microsoft Entra environment to the settings file.
4645
### Example 1: Add a user defined environment
4746

4847
```powershell
49-
PS C:\>Add-EntraEnvironment -Name "Canary" -GraphEndpoint "https://canary.graph.microsoft.com" -AzureADEndpoint "https://login.microsoftonline.com"
48+
$params = @{
49+
Name = 'Canary'
50+
GraphEndpoint = 'https://canary.graph.microsoft.com'
51+
AzureADEndpoint = 'https://login.microsoftonline.com'
52+
}
53+
54+
Add-EntraEnvironment @params
55+
```
56+
57+
```Output
5058
Name AzureADEndpoint GraphEndpoint Type
5159
---- --------------- ------------- ----
5260
Canary https://login.microsoftonline.com https://microsoftgraph.com User-defined {}
5361
```
5462

55-
Adds a User defined Entra environment to the settings file.
63+
Adds a user-defined Entra environment to the settings file.
5664

5765
## Parameters
5866

@@ -97,7 +105,7 @@ Accept wildcard characters: False
97105
98106
### CommonParameters
99107
100-
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).
108+
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).
101109

102110
## Inputs
103111

module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Convert-EntraFederatedUser.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ schema: 2.0.0
1919
# Convert-EntraFederatedUser
2020

2121
## Synopsis
22+
2223
Updates a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type.
2324

2425
## Syntax
@@ -31,24 +32,34 @@ Convert-EntraFederatedUser
3132
```
3233

3334
## Description
34-
The Convert-EntraFederatedUser cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user.
35+
36+
The `Convert-EntraFederatedUser` cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user.
37+
38+
This process writes the new password to Microsoft Entra ID and, if configured with password writeback, pushes it to on-premises Active Directory. The admin can provide a new password or let the system generate one. The user will be prompted to change their password at their next sign-in.
39+
40+
For delegated scenarios, the administrator needs at least the Authentication Administrator or Privileged Authentication Administrator Microsoft Entra role.
41+
42+
Admins with User Administrator, Helpdesk Administrator, or Password Administrator roles can also reset passwords for non-admin users and a limited set of admin roles.
3543

3644
## Examples
3745

3846
### EXAMPLE 1: Update a user in a domain
47+
3948
```powershell
40-
PS C:\> Convert-EntraFederatedUser -UserPrincipalName "[email protected]"
49+
Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All'
50+
Convert-EntraFederatedUser -UserPrincipalName '[email protected]'
4151
```
4252

4353
This command updates a user in a domain.
4454

4555
## Parameters
4656

4757
### -UserPrincipalName
58+
4859
The Microsoft Entra ID UserID for the user to convert.
4960

5061
```yaml
51-
Type: String
62+
Type: System.String
5263
Parameter Sets: (All)
5364
Aliases:
5465

@@ -60,10 +71,13 @@ Accept wildcard characters: False
6071
```
6172
6273
### -NewPassword
74+
6375
The new password of the user.
6476
77+
The new password is required for tenants with hybrid password scenarios. If omitted for a cloud-only password, the system generates a password. This password is a Unicode string with no other encoding. It is validated against the tenant's banned password system before acceptance and must meet the tenant's cloud and/or on-premises password requirements.
78+
6579
```yaml
66-
Type: String
80+
Type: System.String
6781
Parameter Sets: (All)
6882
Aliases:
6983

@@ -75,12 +89,15 @@ Accept wildcard characters: False
7589
```
7690
7791
### CommonParameters
78-
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).
92+
93+
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).
7994

8095
## Inputs
8196

8297
## Outputs
8398

8499
## Notes
85100

101+
- For more information, see [resetPassword](/graph/api/authenticationmethod-resetpassword).
102+
86103
## Related Links

module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraDirectoryRole.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ schema: 2.0.0
1919
# Enable-EntraDirectoryRole
2020

2121
## Synopsis
22+
2223
Activates an existing directory role in Microsoft Entra ID.
2324

2425
## Syntax
@@ -30,33 +31,39 @@ Enable-EntraDirectoryRole
3031
```
3132

3233
## Description
33-
The Enable-EntraDirectoryRole cmdlet activates an existing directory role in Microsoft Entra ID.
34+
35+
The `Enable-EntraDirectoryRole` cmdlet activates an existing directory role in Microsoft Entra ID.
36+
37+
The Company Administrators and the default user directory roles (User, Guest User, and Restricted Guest User) are activated by default. To access and assign members to other directory roles, you must first activate them using their corresponding directory role template ID.
3438

3539
## Examples
3640

3741
### Example 1: Enable a directory role
42+
3843
```powershell
39-
PS C:\> $InviterRole = Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq "Guest Inviter"}
40-
PS C:\> Enable-EntraDirectoryRole -RoleTemplateId $InviterRole.ObjectId
44+
Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory'
45+
$InviterRole = Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Guest Inviter'}
46+
Enable-EntraDirectoryRole -RoleTemplateId $InviterRole.ObjectId
4147
```
4248

43-
```output
49+
```Output
4450
DeletedDateTime Id Description DisplayName RoleTemplateId
4551
--------------- -- ----------- ----------- --------------
4652
b5baa59b-86ab-4053-ac3a-0396116d1924 Guest Inviter has access to invite guest users. Guest Inviter 92ed04bf-c94a-4b82-9729-b799a7a4c178
4753
```
4854

49-
The first command gets an inviter role that has the display name Guest Inviter by using the [Get-EntraDirectoryRoleTemplate](./Get-EntraDirectoryRoleTemplate.md) cmdlet and stores Guest Inviter in the $InviterRole variable.
55+
The example shows how to enable the directory role.
5056

51-
The final command enables the directory role in $InviterRole.
57+
You can use `Get-EntraDirectoryRoleTemplate` to fetch a specific directory role to activate.
5258

5359
## Parameters
5460

5561
### -RoleTemplateId
56-
The ID of the Role template to enable
62+
63+
The ID of the directoryRoleTemplate that the role is based on.
5764

5865
```yaml
59-
Type: String
66+
Type: System.String
6067
Parameter Sets: (All)
6168
Aliases:
6269

@@ -68,17 +75,19 @@ Accept wildcard characters: False
6875
```
6976
7077
### CommonParameters
71-
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).
78+
79+
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).
7280

7381
## Inputs
7482

7583
## Outputs
7684

7785
## Notes
7886

87+
- For additional details see [Activate directoryRole](/graph/api/directoryrole-post-directoryroles).
88+
7989
## Related Links
8090

8191
[Get-EntraDirectoryRole](Get-EntraDirectoryRole.md)
8292

8393
[Get-EntraDirectoryRoleTemplate](Get-EntraDirectoryRoleTemplate.md)
84-

module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAccountSku.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,65 +19,75 @@ schema: 2.0.0
1919
# Get-EntraAccountSku
2020

2121
## Synopsis
22+
2223
Retrieves all the SKUs for a company.
2324

2425
## Syntax
2526

2627
### GetQuery (Default)
28+
2729
```powershell
2830
Get-EntraAccountSku
2931
[<CommonParameters>]
3032
```
3133

3234
### GetById
35+
3336
```powershell
3437
Get-EntraAccountSku
3538
[-TenantId <Guid>]
3639
[<CommonParameters>]
3740
```
3841

3942
## Description
40-
The Get-EntraAccountSku returns all the SKUs that the company owns.
43+
44+
The `Get-EntraAccountSku` retrieves the list of commercial subscriptions acquired by an organization.
45+
46+
To map license names as displayed in the Microsoft Entra admin center or the Microsoft 365 admin center to their Microsoft Graph skuId and skuPartNumber properties, refer to the provided mapping information.
4147

4248
## Examples
4349

4450
### EXAMPLE 1: Gets a list of SKUs
51+
4552
```powershell
46-
PS C:\> Get-EntraAccountSku
53+
Connect-Entra -Scopes 'Organization.Read.All'
54+
Get-EntraAccountSku
4755
```
4856

49-
```output
57+
```Output
5058
Id AccountId AccountName AppliesTo
5159
-- --------- ----------- -------
52-
95d4390e_b05e124f-c7cc-45a0-a6aa-8cf78c946968 d5aec55f-2d12-4442-8d2f-ccca95d4390e M365x99297270 User
53-
95d4390e_c7df2760-2c81-4ef7-b578-5b5392b571df d5aec55f-2d12-4442-8d2f-ccca95d4390e M365x99297270 User
54-
95d4390e_6fd2c87f-b296-42f0-b197-1e91e994b900 d5aec55f-2d12-4442-8d2f-ccca95d4390e M365x99297270 User
60+
eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso User
61+
ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso User
62+
dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso User
5563
```
5664

5765
This command returns a list of SKUs.
5866

5967
### EXAMPLE 2: Gets a list of SKUs by TenantId
68+
6069
```powershell
61-
PS C:\> Get-EntraAccountSku -TenantId "d5aec55f-2d12-4442-8d2f-ccca95d4390e"
70+
Connect-Entra -Scopes 'Organization.Read.All'
71+
Get-EntraAccountSku -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee'
6272
```
6373

64-
```output
74+
```Output
6575
Id AccountId AccountName AppliesTo
6676
-- --------- ----------- -------
67-
95d4390e_b05e124f-c7cc-45a0-a6aa-8cf78c946968 d5aec55f-2d12-4442-8d2f-ccca95d4390e M365x99297270 User
68-
95d4390e_c7df2760-2c81-4ef7-b578-5b5392b571df d5aec55f-2d12-4442-8d2f-ccca95d4390e M365x99297270 User
69-
95d4390e_6fd2c87f-b296-42f0-b197-1e91e994b900 d5aec55f-2d12-4442-8d2f-ccca95d4390e M365x99297270 User
77+
eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso User
78+
ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso User
79+
dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso User
7080
```
7181

72-
This command returns a list of SKUs by TenantId.
82+
This command returns a list of SKUs for a tenant.
7383

7484
## Parameters
7585

7686
### -TenantId
87+
7788
The unique ID of the tenant to perform the operation on.
7889
If this isn't provided then the value defaults to
7990
the tenant of the current user.
80-
This parameter is only applicable to partner users.
8191

8292
```yaml
8393
Type: Guid
@@ -92,7 +102,8 @@ Accept wildcard characters: False
92102
```
93103
94104
### CommonParameters
95-
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).
105+
106+
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).
96107

97108
## Inputs
98109

module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ schema: 2.0.0
1818
# Get-EntraApplicationKeyCredential
1919

2020
## Synopsis
21+
2122
Gets the key credentials for an application.
2223

2324
## Syntax
@@ -29,42 +30,34 @@ Get-EntraApplicationKeyCredential
2930
```
3031

3132
## Description
32-
The Get-EntraApplicationKeyCredential cmdlet gets the key credentials for an application.
33+
34+
The `Get-EntraApplicationKeyCredential` cmdlet retrieves the key credentials for an application.
3335

3436
## Examples
3537

3638
### Example 1: Get key credentials
39+
3740
```powershell
38-
PS C:\> Get-EntraApplicationKeyCredential -ObjectId "3ddd22e7-a150-4bb3-b100-e410dea1cb84"
41+
Connect-Entra -Scopes 'Application.Read.All'
42+
Get-EntraApplicationKeyCredential -ObjectId '00001111-aaaa-2222-bbbb-3333cccc4444'
3943
```
4044

41-
```output
42-
CustomKeyIdentifier : {116, 101, 115, 116}
43-
EndDate : 10/23/2024 11:36:56 AM
44-
KeyId : 52ab6cca-bc59-4f06-8450-75a3d2b8e53b
45-
StartDate : 11/22/2023 11:35:16 AM
46-
Type : Symmetric
47-
Usage : Sign
48-
Value :
49-
50-
CustomKeyIdentifier : {84, 101, 115, 116}
51-
EndDate : 10/23/2024 9:46:49 AM
52-
KeyId : 2e5143ee-9912-40c1-8c6a-a84f8124a6af
53-
StartDate : 10/23/2023 9:46:48 AM
54-
Type : Symmetric
55-
Usage : Sign
56-
Value :
45+
```Output
46+
CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage
47+
------------------- ----------- ----------- --- ----- ------------- ---- -----
48+
{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify
5749
```
5850

5951
This command gets the key credentials for the specified application.
6052

6153
## Parameters
6254

6355
### -ObjectId
56+
6457
Specifies a unique ID of an application in Microsoft Entra ID for which to get key credentials.
6558

6659
```yaml
67-
Type: String
60+
Type: System.String
6861
Parameter Sets: (All)
6962
Aliases:
7063

@@ -76,7 +69,8 @@ Accept wildcard characters: False
7669
```
7770
7871
### CommonParameters
79-
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).
72+
73+
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).
8074

8175
## Inputs
8276

@@ -89,4 +83,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
8983
[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md)
9084

9185
[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md)
92-

0 commit comments

Comments
 (0)