Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fix `Get-PnPTenantRestrictedSearchMode` throwing an error in some cases [#5042](https://github.com/pnp/powershell/pull/5042)
- Fixed issues with `Get-PnPTenantInfo`, `Set-PnPList`, `Remove-PnPSiteSensitivityLabel`, `Set-PnPSiteSensitivityLabel`, `Send-PnPMail` and `Set-PnPWebHeader` cmdlets returning an error [#5059](https://github.com/pnp/powershell/pull/5059)
- Fixed issue with `Get-PnPChangelog -Nightly` throwing an error [#5070](https://github.com/pnp/powershell/pull/5070)
- Fixed spelling errors in Privileged Identity Management cmdlets: renamed `Get-PnPPriviledgedIdentityManagementRole`, `Get-PnPPriviledgedIdentityManagementEligibleAssignment`, and `Enable-PnPPriviledgedIdentityManagement` to use correct spelling "Privileged". Old cmdlet names remain functional as aliases for backward compatibility. [#5119](https://github.com/pnp/powershell/pull/5119)

### Removed

Expand Down Expand Up @@ -86,7 +87,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added tab completers for all cmdlets using a ListPipeBind parameter (e.g. `Get-PnPList -Identity`), all cmdlets using a FieldPipeBind parameter (e.g. `Get-PnPField -Identity`), `Get-PnPPropertyBag`, ContentType related cmdlets (`Get-PnPContentType` etc.) and Page related (`Get-PnPPage` etc.) cmdlets. The argument lookup will timeout after 2 seconds. This value can controlled by setting an environment variables called "PNPPSCOMPLETERTIMEOUT" and set the value to a number specifying milliseconds (e.g. 2000 is 2 seconds). If you want to disable the completer functionality on tabs, set the timeout value to 0 (zero).
- Added `Reset-PnPDocumentID` cmdlet to request resetting the document ID for a document [#4238](https://github.com/pnp/powershell/pull/4238)
- Added `Reset-PnPDocumentID` cmdlet to request resetting the document IDs for all documents in a library using a specific content type [#4755](https://github.com/pnp/powershell/pull/4755)
- Added `Get-PnPPriviledgedIdentityManagementEligibleAssignment`, `Get-PnPPriviledgedIdentityManagementRole` and `Enable-PnPPriviledgedIdentityManagement` cmdlets to allow scripting of enabling Privileged Identity Management roles for a user [#4039](https://github.com/pnp/powershell/pull/4039)
- Added `Get-PnPPrivilegedIdentityManagementEligibleAssignment`, `Get-PnPPrivilegedIdentityManagementRole` and `Enable-PnPPrivilegedIdentityManagement` cmdlets to allow scripting of enabling Privileged Identity Management roles for a user [#4039](https://github.com/pnp/powershell/pull/4039)
- Added `Add-PnPTenantRestrictedSearchAllowedList` which allows setting up a list of allowed URLs for Restricted SharePoint Search [#3993](https://github.com/pnp/powershell/pull/3993)
- Added optional `-IsCopilotSearchable` to `Add-PnPOrgAssetsLibrary` which allows for an organizational assets library to be accessible to Microsoft 365 CoPilot for searching corporate images [#4254](https://github.com/pnp/powershell/pull/4254)
- Added `Set-PnPOrgAssetsLibrary` cmdlet which allows for updating the settings of an existing organizational assets library [#4254](https://github.com/pnp/powershell/pull/4254)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Enable-PnPPriviledgedIdentityManagement.html
online version: https://pnp.github.io/powershell/cmdlets/Enable-PnPPrivilegedIdentityManagement.html
external help file: PnP.PowerShell.dll-Help.xml
title: Enable-PnPPriviledgedIdentityManagement
title: Enable-PnPPrivilegedIdentityManagement
---

# Enable-PnPPriviledgedIdentityManagement
# Enable-PnPPrivilegedIdentityManagement

## SYNOPSIS

Expand All @@ -22,19 +22,19 @@ Temporarily enables a Privileged Identity Management role for a user
### By Role Name And Principal

```powershell
Enable-PnPPriviledgedIdentityManagement -Role <PriviledgedIdentityManagementRolePipeBind> [-PrincipalId <Guid>] [-Justification <string>] [-StartAt <DateTime>] [-ExpireInHours <short>] [-Connection <PnPConnection>]
Enable-PnPPrivilegedIdentityManagement -Role <PrivilegedIdentityManagementRolePipeBind> [-PrincipalId <Guid>] [-Justification <string>] [-StartAt <DateTime>] [-ExpireInHours <short>] [-Connection <PnPConnection>]
```

### By Role Name And User

```powershell
Enable-PnPPriviledgedIdentityManagement -Role <PriviledgedIdentityManagementRolePipeBind> -User <AzureADUserPipeBind> [-Justification <string>] [-StartAt <DateTime>] [-ExpireInHours <short>] [-Connection <PnPConnection>]
Enable-PnPPrivilegedIdentityManagement -Role <PrivilegedIdentityManagementRolePipeBind> -User <AzureADUserPipeBind> [-Justification <string>] [-StartAt <DateTime>] [-ExpireInHours <short>] [-Connection <PnPConnection>]
```

### By Eligible Role Assignment

```powershell
Enable-PnPPriviledgedIdentityManagement -EligibleAssignment <PriviledgedIdentityManagementRolePipeBind> [-Justification <string>] [-StartAt <DateTime>] [-ExpireInHours <short>] [-Connection <PnPConnection>]
Enable-PnPPrivilegedIdentityManagement -EligibleAssignment <PrivilegedIdentityManagementRolePipeBind> [-Justification <string>] [-StartAt <DateTime>] [-ExpireInHours <short>] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -44,28 +44,28 @@ Temporarily enables a Privileged Identity Management role for the provided allow

### Example 1
```powershell
Enable-PnPPriviledgedIdentityManagement -Role "Global Administrator"
Enable-PnPPrivilegedIdentityManagement -Role "Global Administrator"
```

Enables the global administrator role for the current user through Privileged Identity Management starting immediately and expiring in 1 hour

### Example 2
```powershell
Enable-PnPPriviledgedIdentityManagement -Role "Global Administrator" -Justification "Just because"
Enable-PnPPrivilegedIdentityManagement -Role "Global Administrator" -Justification "Just because"
```

Enables the global administrator role for the current user through Privileged Identity Management starting immediately and expiring in 1 hour, adding the justification provided to be logged as the reason for the elevation of rights

### Example 3
```powershell
Enable-PnPPriviledgedIdentityManagement -Role "Global Administrator" -Justification "Just because" -StartAt (Get-Date).AddHours(2) -ExpireInHours 2
Enable-PnPPrivilegedIdentityManagement -Role "Global Administrator" -Justification "Just because" -StartAt (Get-Date).AddHours(2) -ExpireInHours 2
```

Enables the global administrator role for the current user through Privileged Identity Management starting in 2 hours from now and expiring 2 hours thereafter, adding the justification provided to be logged as the reason for the elevation of rights

### Example 4
```powershell
Enable-PnPPriviledgedIdentityManagement -Role "Global Administrator" -User "[email protected]"
Enable-PnPPrivilegedIdentityManagement -Role "Global Administrator" -User "[email protected]"
```

Enables the global administrator role for the provided user through Privileged Identity Management starting immediately and expiring in 1 hour
Expand Down Expand Up @@ -134,10 +134,10 @@ Accept wildcard characters: False
```

### -Role
The Id, name or instance of a role to elevate the current user to. Use `Get-PnPPriviledgedIdentityManagementRole` to retrieve the available roles.
The Id, name or instance of a role to elevate the current user to. Use `Get-PnPPrivilegedIdentityManagementRole` to retrieve the available roles.

```yaml
Type: PriviledgedIdentityManagementRolePipeBind
Type: PrivilegedIdentityManagementRolePipeBind
Parameter Sets: By Role Name And Principal, By Role Name And User
Aliases:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPPriviledgedIdentityManagementEligibleAssignment.html
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPPrivilegedIdentityManagementEligibleAssignment.html
external help file: PnP.PowerShell.dll-Help.xml
title: Get-PnPPriviledgedIdentityManagementEligibleAssignment
title: Get-PnPPrivilegedIdentityManagementEligibleAssignment
---

# Get-PnPPriviledgedIdentityManagementEligibleAssignment
# Get-PnPPrivilegedIdentityManagementEligibleAssignment

## SYNOPSIS

Expand All @@ -20,7 +20,7 @@ Retrieve the available Privileged Identity Management eligibility assignment rol
## SYNTAX

```powershell
Get-PnPPriviledgedIdentityManagementEligibleAssignment [-Identity <PriviledgedIdentityManagementRoleEligibilitySchedulePipeBind>] [-Connection <PnPConnection>]
Get-PnPPrivilegedIdentityManagementEligibleAssignment [-Identity <PrivilegedIdentityManagementRoleEligibilitySchedulePipeBind>] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -30,14 +30,14 @@ Retrieve the available Privileged Identity Management eligibility assignment rol

### Example 1
```powershell
Get-PnPPriviledgedIdentityManagementEligibleAssignment
Get-PnPPrivilegedIdentityManagementEligibleAssignment
```

Retrieves the available Privileged Identity Management eligibility assignment roles

### Example 2
```powershell
Get-PnPPriviledgedIdentityManagementEligibleAssignment -Identity 62e90394-69f5-4237-9190-012177145e10
Get-PnPPrivilegedIdentityManagementEligibleAssignment -Identity 62e90394-69f5-4237-9190-012177145e10
```

Retrieves the Privileged Identity Management eligibility assignment role with the provided id
Expand All @@ -61,10 +61,10 @@ Accept wildcard characters: False
```

### -Identity
The name, id or instance of a Priviledged Identity Management eligibility assignment role to retrieve the details of
The name, id or instance of a Privileged Identity Management eligibility assignment role to retrieve the details of

```yaml
Type: PriviledgedIdentityManagementRoleEligibilitySchedulePipeBind
Type: PrivilegedIdentityManagementRoleEligibilitySchedulePipeBind
Parameter Sets: (All)
Aliases:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPPriviledgedIdentityManagementRole.html
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPPrivilegedIdentityManagementRole.html
external help file: PnP.PowerShell.dll-Help.xml
title: Get-PnPPriviledgedIdentityManagementRole
title: Get-PnPPrivilegedIdentityManagementRole
---

# Get-PnPPriviledgedIdentityManagementRole
# Get-PnPPrivilegedIdentityManagementRole

## SYNOPSIS

Expand All @@ -20,7 +20,7 @@ Retrieve the available Privileged Identity Management roles that exist within th
## SYNTAX

```powershell
Get-PnPPriviledgedIdentityManagementRole [-Identity <PriviledgedIdentityManagementRolePipeBind>] [-Connection <PnPConnection>]
Get-PnPPrivilegedIdentityManagementRole [-Identity <PrivilegedIdentityManagementRolePipeBind>] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -30,21 +30,21 @@ Retrieve the available Privileged Identity Management roles that exist within th

### Example 1
```powershell
Get-PnPPriviledgedIdentityManagementRole
Get-PnPPrivilegedIdentityManagementRole
```

Retrieves the available Privileged Identity Management roles

### Example 2
```powershell
Get-PnPPriviledgedIdentityManagementRole -Identity "Global Administrator"
Get-PnPPrivilegedIdentityManagementRole -Identity "Global Administrator"
```

Retrieves the Privileged Identity Management with the provided name

### Example 3
```powershell
Get-PnPPriviledgedIdentityManagementRole -Identity 62e90394-69f5-4237-9190-012177145e10
Get-PnPPrivilegedIdentityManagementRole -Identity 62e90394-69f5-4237-9190-012177145e10
```

Retrieves the Privileged Identity Management role with the provided id
Expand All @@ -68,10 +68,10 @@ Accept wildcard characters: False
```

### -Identity
The name, id or instance of a Priviledged Identity Management role to retrieve the details of
The name, id or instance of a Privileged Identity Management role to retrieve the details of

```yaml
Type: PriviledgedIdentityManagementRolePipeBind
Type: PrivilegedIdentityManagementRolePipeBind
Parameter Sets: (All)
Aliases:

Expand Down
4 changes: 2 additions & 2 deletions pages/articles/determinepermissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ When using the `Sites.Selected` permission, you still must assign permissions to
Grant-PnPAzureADAppSitePermission -AppId "<Client ID of your Entra ID applicarion registration>" -DisplayName "PnP PowerShell" -Permissions Read -Site <url of the SharePoint Online site to which you will connect>
```

In order to be able to run this cmdlet, you will need to connect to PnP PowerShell using preferably another Entra ID application registration which will have the `AllSites.FullControl` permission on the delegate scope on SharePoint set to it and being logged on with a Global Administrator or SharePoint Administrator priviledged account.
In order to be able to run this cmdlet, you will need to connect to PnP PowerShell using preferably another Entra ID application registration which will have the `AllSites.FullControl` permission on the delegate scope on SharePoint set to it and being logged on with a Global Administrator or SharePoint Administrator privileged account.

## Adding additional permissions as needed

Expand Down Expand Up @@ -65,7 +65,7 @@ In this scenario, you now know you need to add `Application.Read.All` on the app

As mentioned above, unfortunately, not for all cmdlets it will be clear which exact (minimum) permissions will be needed. Not even when using `-Verbose`. To give some guidance which permissions you could try for a minimum permissions approach, follow the table below.

What are you trying to do | Permission type | Permission(s) likely needed from least to most priviledged
What are you trying to do | Permission type | Permission(s) likely needed from least to most privileged
| ------------------------| --------------- | -------------------------- |
| Interact with SharePoint | Delegate | AllSites.Read / AllSites.Write / AllSites.Manage / AllSites.FullControl |
| Interact with SharePoint | App Only | Sites.Selected / Sites.Read.All / Sites.ReadWrite.All / Sites.Manage.All / Sites.FullControl .All |
Expand Down
2 changes: 1 addition & 1 deletion pages/articles/permissionattributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If multiple attributes are defined on a cmdlet, the cmdlet will require only one
[RequiredApiDelegatedOrApplicationPermissions("graph/Directory.ReadWrite.All")]
```

These attributes should be added starting with the least priviledged one at the top going down towards the most priviledged permission.
These attributes should be added starting with the least privileged one at the top going down towards the most privileged permission.

If you have a scenario that a combination of permissions is required, you can define multiple permissions in the same attribute to have them be handled as an AND. I.e. the following permission attributes would define that all of the permissions are required to run the cmdlet:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
using PnP.PowerShell.Commands.Model.PriviledgedIdentityManagement;
using PnP.PowerShell.Commands.Model.PrivilegedIdentityManagement;
using PnP.PowerShell.Commands.Utilities;
using PnP.PowerShell.Commands.Utilities.REST;
using System;
using System.Management.Automation;

namespace PnP.PowerShell.Commands.Base.PipeBinds
{
public sealed class PriviledgedIdentityManagementRoleEligibilitySchedulePipeBind
public sealed class PrivilegedIdentityManagementRoleEligibilitySchedulePipeBind
{
public readonly Guid? Id;

public RoleEligibilitySchedule Instance { get; private set; }

public PriviledgedIdentityManagementRoleEligibilitySchedulePipeBind(RoleEligibilitySchedule instance)
public PrivilegedIdentityManagementRoleEligibilitySchedulePipeBind(RoleEligibilitySchedule instance)
{
Instance = instance;
}

public PriviledgedIdentityManagementRoleEligibilitySchedulePipeBind(Guid id)
public PrivilegedIdentityManagementRoleEligibilitySchedulePipeBind(Guid id)
{
Id = id;
}

public PriviledgedIdentityManagementRoleEligibilitySchedulePipeBind(string id)
public PrivilegedIdentityManagementRoleEligibilitySchedulePipeBind(string id)
{
if (!string.IsNullOrEmpty(id) && Guid.TryParse(id, out Guid idGuid))
{
Expand All @@ -38,7 +38,7 @@ internal RoleEligibilitySchedule GetInstance(ApiRequestHelper requestHelper)
}
if (Id.HasValue)
{
Instance = PriviledgedIdentityManagamentUtility.GetRoleEligibilityScheduleById(requestHelper, Id.Value);
Instance = PrivilegedIdentityManagementUtility.GetRoleEligibilityScheduleById(requestHelper, Id.Value);
}
return Instance;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
using PnP.PowerShell.Commands.Model.PriviledgedIdentityManagement;
using PnP.PowerShell.Commands.Model.PrivilegedIdentityManagement;
using PnP.PowerShell.Commands.Utilities;
using PnP.PowerShell.Commands.Utilities.REST;
using System;
using System.Management.Automation;

namespace PnP.PowerShell.Commands.Base.PipeBinds
{
public sealed class PriviledgedIdentityManagementRolePipeBind
public sealed class PrivilegedIdentityManagementRolePipeBind
{
public readonly Guid? Id;

public readonly string DisplayName;

public RoleDefinition Instance { get; private set; }

public PriviledgedIdentityManagementRolePipeBind(RoleDefinition instance)
public PrivilegedIdentityManagementRolePipeBind(RoleDefinition instance)
{
Instance = instance;
}

public PriviledgedIdentityManagementRolePipeBind(Guid id)
public PrivilegedIdentityManagementRolePipeBind(Guid id)
{
Id = id;
}

public PriviledgedIdentityManagementRolePipeBind(string id)
public PrivilegedIdentityManagementRolePipeBind(string id)
{
if(Guid.TryParse(id, out Guid guidId))
{
Expand All @@ -44,11 +44,11 @@ internal RoleDefinition GetInstance(ApiRequestHelper requestHelper)
}
if (Id.HasValue)
{
Instance = PriviledgedIdentityManagamentUtility.GetRoleDefinitionById(requestHelper, Id.Value);
Instance = PrivilegedIdentityManagementUtility.GetRoleDefinitionById(requestHelper, Id.Value);
}
if (!string.IsNullOrEmpty(DisplayName))
{
Instance = PriviledgedIdentityManagamentUtility.GetRoleDefinitionByName(requestHelper, DisplayName);
Instance = PrivilegedIdentityManagementUtility.GetRoleDefinitionByName(requestHelper, DisplayName);
}
return Instance;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PnP.PowerShell.Commands.Model.PriviledgedIdentityManagement
namespace PnP.PowerShell.Commands.Model.PrivilegedIdentityManagement
{
/// <summary>
/// Defines an expiration of a scheduled role assignment within Privileged Identity Management
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace PnP.PowerShell.Commands.Model.PriviledgedIdentityManagement
namespace PnP.PowerShell.Commands.Model.PrivilegedIdentityManagement
{
/// <summary>
/// Requests enabling a role assignment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;

namespace PnP.PowerShell.Commands.Model.PriviledgedIdentityManagement
namespace PnP.PowerShell.Commands.Model.PrivilegedIdentityManagement
{
/// <summary>
/// A role definition in Entra ID Priviledged Identity Management
/// A role definition in Entra ID Privileged Identity Management
/// </summary>
public class RoleDefinition
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;

namespace PnP.PowerShell.Commands.Model.PriviledgedIdentityManagement
namespace PnP.PowerShell.Commands.Model.PrivilegedIdentityManagement
{
/// <summary>
/// An elibible role in Entra ID Priviledged Identity Management
/// An eligible role in Entra ID Privileged Identity Management
/// </summary>
public class RoleEligibilitySchedule
{
Expand Down
Loading