Skip to content

Instantly share code, notes, and snippets.

@craigm26
craigm26 / UpdateSiteAdministratorOneDrive.ps1
Last active July 3, 2024 18:57
SharePoint Online: Update Site Administrator for all tenant OneDrives
# Import PnP PowerShell module to interact with SharePoint Online - if not already installed, run Install-Module PnP.PowerShell
Import-Module PnP.PowerShell
# Step 1: Connect to the SharePoint Admin Center
Connect-PnPOnline -Url https://yourtenantdomain-admin.sharepoint.com -Interactive
# Specify the email address to remove
$emailToRemove = "[email protected]" # replace with the email address you want to remove
# Step 2: Retrieve all OneDrive site URLs
@craigm26
craigm26 / AdobeCommandSet.ts
Last active July 19, 2024 16:10
SharePoint Adobe integration library extension
# Goal: replicate the deprecated SharePoint-Adobe Integration
# setup 2 text columns in SharePoint where this action needs to be performed: "Adobe Sign Status" and "AgreementId"
# start a regular typescript project for SharePoint with the command set for library extensions.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api
# have a (supposedly deprecated) Adobe Integration key handy.
https://na3.documents.adobe.com/account/accountSettingsPage#pageId::ACCESS_TOKENS
# you can use the client-to-server authentication method for app id and thats fine. Be wary of user clicks.