### Initialize OneDrive with Tenant GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Initialize-CIPPUserOneDrive.md Initializes a OneDrive personal site using the tenant GUID. ```powershell PS > Initialize-CIPPUserOneDrive -CustomerTenantID "7a90b7e8-5f9a-4c3d-8b2e-1a3f5c7d9e2b" -UserPrincipalName "jane.smith@contoso.com" ``` -------------------------------- ### Remove-CIPPDevice Usage Examples Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Remove-CIPPDevice.md Examples demonstrating how to perform device actions like deletion and disabling using specific tenant and device identifiers. ```powershell PS > Remove-CIPPDevice -CustomerTenantID "contoso.onmicrosoft.com" -DeviceID "12345678-1234-1234-1234-123456789abc" -Action "delete" ``` ```powershell PS > Remove-CIPPDevice -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -DeviceID "87654321-4321-4321-4321-cba987654321" -Action "disable" ``` -------------------------------- ### Set-CIPPSignInStatus Usage Examples Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Set-CIPPSignInStatus.md Examples demonstrating how to enable or disable sign-in status for a specific user within a customer tenant. ```powershell PS > Set-CIPPSignInStatus -CustomerTenantID "47b02ab5-376d-4c85-b82d-13996c023c93" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Enable "true" ``` ```powershell PS > Set-CIPPSignInStatus -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -UserID "281ceb6e-3d12-4a7f-b571-3c4f35ad85bc" -Enable "false" ``` -------------------------------- ### Add Exchange Connector using Template GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPExchConnector.md Use this example to add an Exchange Connector for a customer tenant by specifying the template's GUID. Ensure the CustomerTenantDefaultDomain and TemplateGuid parameters are correctly provided. ```powershell Add-CIPPExchConnector -CustomerTenantDefaultDomain "example.com" -TemplateGuid "12345678-1234-1234-1234-123456789012" ``` -------------------------------- ### Invoke CIPP REST Method - GET with Multiple Params Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Invoke-CIPPRestMethod.md This example demonstrates invoking a GET request with multiple query parameters. Ensure all required parameters for the endpoint are provided. ```powershell PS > Invoke-CIPPRestMethod -Endpoint '/api/ListMailboxPermissions' -Params @{ 'tenantFilter' = 'M365x72601982.onmicrosoft.com', 'userid' = '11c11ab1-527a-1d29-l92e-76413h012s76'} ``` -------------------------------- ### Install CIPP API Module Source: https://github.com/bnwein/cippapimodule/blob/main/README.md Installs the CIPPAPIModule from the PowerShell Gallery. Ensure you have PowerShell 7 or later. ```powershell Install-Module -Name CIPPAPIModule ``` -------------------------------- ### Set-CIPPUser Example Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Set-CIPPUser.md Example usage of the Set-CIPPUser command to update various user profile fields. ```powershell P > S e t - C I P P U s e r - C u s t o m e r T e n a n t I D " 7 c e d 1 6 2 1 - b 8 f 7 - 4 2 3 1 - 8 6 8 c - b c 6 b 1 a 2 f 1 7 7 8 " - U s e r I D " u s e r 1 " - D i s p l a y N a m e " J o h n D o e " - U s e r N a m e " j o h n d o e " - F i r s t N a m e " J o h n " - L a s t N a m e " D o e " - D o m a i n " e x a m p l e . c o m " - U s a g e L o c a t i o n " U S " - D e p a r t m e n t " I T " - C i t y " N e w Y o r k " - C o u n t r y " U S A " - J o b t i t l e " D e v e l o p e r " - M o b i l e P h o n e " 1 2 3 4 5 6 7 8 9 0 " - S t r e e t A d d r e s s " 1 2 3 M a i n S t " - P o s t a l C o d e " 1 2 ``` -------------------------------- ### Build and Test Commands Source: https://github.com/bnwein/cippapimodule/blob/main/AGENTS.md Commands for installing dependencies, building the module, and testing connectivity. ```powershell # Install dependencies and build Install-Module ModuleBuilder -Force Build-Module -SemVer "1.0.0" # Import for testing (from source) Import-Module ./CIPPAPIModule/CIPPAPIModule.psd1 -Force # Test manually Set-CIPPAPIDetails -CIPPClientID "id" -CIPPClientSecret "secret" ` -CIPPAPIUrl "https://your-cipp.azurewebsites.net" -TenantID "tenant" Test-CIPPApiConnection Get-CIPPUsers -CustomerTenantID "tenant-guid" ``` -------------------------------- ### Get All Tenant Groups Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPTenantGroups.md Retrieves all tenant groups from the CIPP API. No specific setup is required beyond having the function available. ```powershell PS > Get-CIPPTenantGroups ``` -------------------------------- ### GET /bnwein/cippapimodule/Get-CIPPDevices Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPDevices.md Retrieves a list of devices for a specific customer. ```APIDOC ## GET /bnwein/cippapimodule/Get-CIPPDevices ### Description Retrieves a list of devices for a specific customer. ### Method GET ### Endpoint /bnwein/cippapimodule/Get-CIPPDevices ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - The unique identifier of the customer's tenant. ### Request Example ```powershell PS > Get-CIPPDevices -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" ``` ### Response #### Success Response (200) - **devices** (Array) - A list of devices associated with the customer. #### Response Example ```json { "devices": [ { "deviceId": "device-123", "deviceName": "Device Alpha", "status": "Active" }, { "deviceId": "device-456", "deviceName": "Device Beta", "status": "Inactive" } ] } ``` ``` -------------------------------- ### Start Managed Folder Assistant by Identity Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Start-CIPPManagedFolderAssistant.md Use this command to start the Managed Folder Assistant for a mailbox using its Exchange identity (e.g., SMTP address). Ensure the CustomerTenantID is correctly specified. ```powershell PS > Start-CIPPManagedFolderAssistant -Identity "user@contoso.com" -CustomerTenantID "tenant-id" ``` -------------------------------- ### Retrieve Tenant Drift Data Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPTenantDrift.md Examples showing how to query drift data for all tenants or a specific tenant. ```powershell PS > Get-CIPPTenantDrift ``` ```powershell PS > Get-CIPPTenantDrift -CustomerTenantID "contoso.onmicrosoft.com" ``` -------------------------------- ### Check for updates with verbose output Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Test-CIPPAPIModuleUpdate.md Displays detailed version information for both the local installation and the gallery version. ```powershell PS > Test-CIPPAPIModuleUpdate -Verbose ``` -------------------------------- ### GET /Get-CIPPAppsRepository Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPAppsRepository.md Searches for applications in a specified package repository. ```APIDOC ## GET /Get-CIPPAppsRepository ### Description Searches for applications in a specified package repository (defaults to chocolatey.org). It returns detailed information about found packages including package name, author, version, and description. ### Parameters #### Query Parameters - **Search** (String) - Required - Specifies the search term to find packages. - **Repository** (String) - Optional - Specifies the repository URL to search in. Defaults to 'https://chocolatey.org/api/v2'. ### Request Example Get-CIPPAppsRepository -Search 'chrome' ### Response - **PackageName** (String) - The name of the package. - **Author** (String) - The author of the package. - **Version** (String) - The version of the package. - **Description** (String) - A description of the package. ``` -------------------------------- ### Perform Geo IP Lookup Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPExternalGEOIPLookup.md Examples demonstrating how to query geographical information for specific IP addresses. ```powershell PS > Get-CIPPExternalGEOIPLookup -IP "8.8.8.8" ``` ```powershell PS > Get-CIPPExternalGEOIPLookup -IP "2001:0db8:85a3:0000:0000:8a2e:0370:7334" ``` -------------------------------- ### GET /Get-CIPPCSPLicenses Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPCSPLicenses.md Retrieves CSP license information for a specified customer tenant. ```APIDOC ## GET /Get-CIPPCSPLicenses ### Description The Get-CIPPCSPLicenses function retrieves Cloud Solution Provider (CSP) license information from CIPP. ### Method GET ### Endpoint /Get-CIPPCSPLicenses ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - Specifies the ID of the customer tenant where the operation will be performed. ### Request Example Get-CIPPCSPLicenses -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" ``` -------------------------------- ### Invoke CIPP REST Method - GET Example Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Invoke-CIPPRestMethod.md Use this snippet to invoke a GET request to a CIPP API endpoint. Specify the endpoint and any necessary query parameters. ```powershell PS > Invoke-CIPPRestMethod -Endpoint '/api/Listusers' -Method 'GET' -Params @{ 'tenantFilter' = '11c11ab1-527a-1d29-l92e-76413h012s76' } ``` -------------------------------- ### Get-CIPPTenantOnboarding Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPTenantOnboarding.md Retrieves comprehensive onboarding information for tenants, including steps, relationships, and logs. ```APIDOC ## Get-CIPPTenantOnboarding ### Description The Get-CIPPTenantOnboarding function retrieves onboarding information for tenants in CIPP, including onboarding steps, relationships, and logs. ### Request Example ```powershell PS > Get-CIPPTenantOnboarding ``` ``` -------------------------------- ### Get BitLocker Recovery Key Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPGetBitLockerKey.md Use this command to retrieve the BitLocker recovery key for a specific computer by providing the CustomerTenantID and the computer's GUID. Ensure you have the correct tenant ID and GUID for the target machine. ```powershell PS > Get-CIPPGetBitLockerKey -CustomerTenantID "12345678-1234-1234-1234-1234567890AB" -guid "01234567-89AB-CDEF-0123-456789ABCDEF" ``` -------------------------------- ### GET /api/LocalAdminPassword Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPLocalAdminPassword.md Retrieves the local admin password for a specified computer using the Customer Tenant ID and Computer GUID. ```APIDOC ## GET /api/LocalAdminPassword ### Description Retrieves the local admin password for a specified computer in the CIPP project. ### Method GET ### Endpoint /api/LocalAdminPassword ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - The ID of the customer tenant. - **GUID** (Guid) - Required - The GUID of the computer for which to retrieve the local admin password. ### Request Example GET /api/LocalAdminPassword?CustomerTenantID=7ced1621-b8f7-4231-868c-bc6b1a2f1778&GUID=abcdefg ``` -------------------------------- ### Retrieve All Equipment for a Tenant Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPEquipment.md Use this example to fetch all equipment records associated with a specific customer tenant ID. Ensure the CustomerTenantID parameter is provided. ```powershell PS > # Retrieve all equipment for a tenant ``` -------------------------------- ### POST /Initialize-CIPPUserOneDrive Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Initialize-CIPPUserOneDrive.md Initializes a OneDrive personal site for a specified user in the customer's tenant. ```APIDOC ## POST /Initialize-CIPPUserOneDrive ### Description The Initialize-CIPPUserOneDrive function initializes a OneDrive personal site for a specified user in the customer's tenant. This function sends a request to provision a SharePoint Online personal site for the user, which creates their OneDrive for Business storage. ### Method POST ### Endpoint /Initialize-CIPPUserOneDrive ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - Specifies the customer tenant ID. - **UserPrincipalName** (String) - Required - Specifies the User Principal Name (email address) of the user for whom to initialize OneDrive. ### Request Example { "CustomerTenantID": "contoso.onmicrosoft.com", "UserPrincipalName": "john.doe@contoso.onmicrosoft.com" } ``` -------------------------------- ### Retrieve CIPP Organization by Tenant ID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPOrg.md Use this function to get details about a specific organization in the CIPP system. Requires the CustomerTenantID, which can be a GUID or a domain name. ```powershell PS > Get-CIPPOrg -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" ``` ```powershell PS > Get-CIPPOrg -CustomerTenantID "contoso.onmicrosoft.com" ``` -------------------------------- ### Initialize-CIPPUserOneDrive Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Set-CIPPPreProvisionOneDrive.md Initializes a OneDrive personal site for a specified user. ```APIDOC ## Initialize-CIPPUserOneDrive ### Description Initializes a OneDrive personal site for a specified user in the customer's tenant. This function sends a request to provision a SharePoint Online personal site for the user, which creates their OneDrive for Business storage. ### Method POST ### Endpoint /api/users/initialize-onedrive ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - Specifies the customer tenant ID. - **UserPrincipalName** (String) - Required - Specifies the User Principal Name (email address) of the user for whom to initialize OneDrive. ### Request Example ```json { "CustomerTenantID": "contoso.onmicrosoft.com", "UserPrincipalName": "john.doe@contoso.onmicrosoft.com" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the operation. - **message** (String) - Provides a confirmation message. #### Response Example ```json { "status": "Success", "message": "OneDrive for user john.doe@contoso.onmicrosoft.com initialized successfully." } ``` ``` -------------------------------- ### Get Specific Tenant Group by ID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPTenantGroups.md Retrieves a specific tenant group from the CIPP API by providing its unique Group ID. Ensure the GroupID is a valid string representation of a GUID. ```powershell PS > Get-CIPPTenantGroups -GroupID "12345678-1234-1234-1234-1234567890AB" ``` -------------------------------- ### Initialize OneDrive with Tenant Name Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Initialize-CIPPUserOneDrive.md Initializes a OneDrive personal site using the tenant domain name. ```powershell PS > Initialize-CIPPUserOneDrive -CustomerTenantID "contoso.onmicrosoft.com" -UserPrincipalName "john.doe@contoso.onmicrosoft.com" ``` -------------------------------- ### GET /api/devices/details Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPDeviceDetails.md Retrieves detailed information about managed devices, including group membership, compliance policies, and installed applications. You can filter by Device ID, Device Name, or Device Serial Number. ```APIDOC ## GET /api/devices/details ### Description Retrieves detailed information about managed devices in Intune, including group membership, compliance policies, and installed applications. ### Method GET ### Endpoint /api/devices/details ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - Specifies the ID of the customer tenant where the operation will be performed. - **DeviceID** (String) - Optional - Specifies the device ID to retrieve details for. - **DeviceName** (String) - Optional - Specifies the device name to search for. - **DeviceSerial** (String) - Optional - Specifies the device serial number to search for. ### Request Example ```json { "CustomerTenantID": "12345678-1234-1234-1234-1234567890AB", "DeviceID": "device123" } ``` ### Response #### Success Response (200) - **DeviceDetails** (Array) - An array of device detail objects. - **DeviceID** (String) - The unique identifier for the device. - **DeviceName** (String) - The name of the device. - **SerialNumber** (String) - The serial number of the device. - **ComplianceState** (String) - The compliance status of the device. - **Groups** (Array) - A list of groups the device belongs to. - **Applications** (Array) - A list of applications installed on the device. #### Response Example ```json { "DeviceDetails": [ { "DeviceID": "device123", "DeviceName": "LAPTOP-XYZ", "SerialNumber": "ABC123", "ComplianceState": "Compliant", "Groups": ["All Users", "Marketing Group"], "Applications": ["Microsoft Office", "VS Code"] } ] } ``` ``` -------------------------------- ### Retrieve Onboarding Status using Default Domain Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPDefenderOnboarding.md This example shows how to retrieve onboarding status using the customer's default domain name instead of a Tenant ID. This queries live Microsoft Graph data. ```powershell PS > Get-CIPPMDEOnboarding -CustomerTenantID "contoso.onmicrosoft.com" ``` -------------------------------- ### Test CIPP API Connectivity Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Test-CIPPPublicPing.md Use this function to send a GET request to the CIPP public ping endpoint. This helps prevent cold starts and verifies API availability. Ensure the CIPP instance URL is provided without a trailing slash. ```powershell PS > Test-CIPPPublicPing -CIPPPublicURL 'https://cipp.domain.com' ``` -------------------------------- ### GET /Get-CIPPPotentialApps Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPPotentialApps.md Searches for available applications from WinGet or Chocolatey repositories based on a search string. ```APIDOC ## GET /Get-CIPPPotentialApps ### Description Searches for available applications from WinGet or Chocolatey repositories. This is useful for finding applications that can be deployed through CIPP to managed endpoints. ### Method GET ### Endpoint /Get-CIPPPotentialApps ### Parameters #### Query Parameters - **Type** (String) - Required - Specifies the application repository type. Valid values are 'WinGet' and 'Choco'. - **SearchString** (String) - Required - Specifies the search term to find applications. ### Request Example Get-CIPPPotentialApps -Type "WinGet" -SearchString "Chrome" ``` -------------------------------- ### Retrieve Intune Intents by GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPIntuneIntents.md Use this command to retrieve Intune Intents for a customer tenant when the tenant ID is provided as a GUID. Ensure the CustomerTenantID parameter is a valid GUID format. ```powershell PS > Get-CIPPIntuneIntents -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" ``` -------------------------------- ### Create Autopilot Configuration with Splatting Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/New-CIPPAutopilotConfig.md Example of creating a new Autopilot configuration profile using a parameter hash table for cleaner syntax. ```powershell PS > $params = @{ Description = "Configuration for shared devices" NotLocalAdmin = $true SharedDevice = $true DeviceNameTemplate = "SHARED-%SERIAL%" HideChangeAccount = $true Language = "en-US" } New-CIPPAutopilotConfig @params ``` -------------------------------- ### Create Autopilot Configuration with Positional Parameters Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/New-CIPPAutopilotConfig.md Example of creating a new Autopilot configuration profile using direct parameter assignment. ```powershell P > N e w - C I P P A u t o p i l o t C o n f i g - C u s t o m e r T e n a n t I D " c o n t o s o . o n m i c r o s o f t . c o m " - D i s p l a y N a m e " S t a n d a r d D e p l o y m e n t " - D e s c r i p t i o n " D e f a u l t c o n f i g u r a t i o n " - D e v i c e N a m e T e m p l a t e " C T O - % S E R I A L % " - L a n g u a g e " e n - U S " ``` -------------------------------- ### Retrieve CIPP function parameters Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPFunctionParameters.md Examples demonstrating how to query parameters for a specific module and function, or for an entire module. ```powershell PS > Get-CIPPFunctionParameters -Module "CIPPCore" -Function "Set-CIPPUserLicense" ``` ```powershell PS > Get-CIPPFunctionParameters -Module "CIPPCore" ``` -------------------------------- ### Execute Device Sync Action Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Set-CIPPDeviceAction.md Use this cmdlet to initiate a device synchronization with the CIPP API. Ensure you provide valid CustomerTenantID, DeviceID, and specify 'syncDevice' as the Action. ```powershell PS > Set-CIPPDeviceAction -CustomerTenantID "contoso.onmicrosoft.com" -DeviceID "98765432-4321-4321-4321-0987654321BA" -Action "syncDevice" ``` -------------------------------- ### Remove a user using GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Remove-CIPPUser.md Removes a user from the specified tenant using their unique GUID identifier. ```powershell PS > Remove-CIPPUser -CustomerTenantID "tenant123.domain.com" -UserID "e7402930-efc9-4ba8-a959-ae7fc6c15021" ``` -------------------------------- ### Retrieve tenant onboarding information Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPTenantOnboarding.md Executes the function to fetch onboarding details for tenants. ```powershell PS > Get-CIPPTenantOnboarding ``` -------------------------------- ### Retrieve partner relationships by GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPPartnerRelationships.md Fetches partner relationships using a specific customer tenant GUID. ```powershell PS > Get-CIPPPartnerRelationships -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" ``` -------------------------------- ### Schedule User Offboarding with Email Notifications Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/New-CIPPUserOffboarding.md This example schedules the offboarding of a user for a future date and configures the results to be sent via email. The date is specified relative to the current date. Ensure the CustomerTenantID and User are correctly specified. ```powershell PS > New-CIPPUserOffboarding -CustomerTenantID "8ad00f9e-1953-47d1-897b-8fec4138cde7" -User "jane.doe@domain.com" -DeleteUser -ScheduledFor ((Get-Date).AddDays(7)) -SendResultsToEmail ``` -------------------------------- ### Clear Immutable ID using GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Clear-CIPPImmutableID.md Clears the Immutable ID for a user identified by their unique GUID. ```powershell PS > Set-CIPPClrImmID -CustomerTenantID "fabrikam.onmicrosoft.com" -UserID "12345678-1234-1234-1234-123456789012" ``` -------------------------------- ### Synchronize DEP tokens using tenant GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Sync-CIPPDEPTokens.md Synchronizes DEP tokens for a tenant specified by its unique GUID. ```powershell PS > Sync-CIPPDEPTokens -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" ``` -------------------------------- ### Search for applications in WinGet and Chocolatey Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPPotentialApps.md Use these examples to query specific repositories for applications by providing a search string. ```powershell PS > Get-CIPPPotentialApps -Type "WinGet" -SearchString "Chrome" ``` ```powershell PS > Get-CIPPPotentialApps -Type "Choco" -SearchString "Firefox" ``` -------------------------------- ### Add-CIPPAutopilotEnrollment Basic Configuration Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPAutopilotEnrollment.md Adds an enrollment configuration with progress shown, device not blocked, and reset allowed. ```powershell PS > Add-CIPPAutopilotEnrollment -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" -ShowProgress $true -BlockDevice $false -AllowReset $true ``` -------------------------------- ### Add Exchange Transport Rule using Template GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPExchTransportRule.md Adds a transport rule to a tenant using a specific template GUID. ```powershell P > A d d - C I P P E x c h T r a n s p o r t R u l e - C u s t o m e r T e n a n t D e f a u l t D o m a i n " e x a m p l e . c o m " - T e m p l a t e G u i d " 1 2 3 4 5 6 7 8 - 1 2 3 4 - 1 2 3 4 - 1 2 3 4 - 1 2 3 4 5 6 7 8 9 0 1 2 " ``` -------------------------------- ### Convert Mailbox Types Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Convert-CIPPMailbox.md Examples demonstrating the conversion of mailboxes to different types using the required tenant and user identifiers. ```powershell PS > Convert-CIPPMailbox -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" -MailboxType "Shared" ``` ```powershell PS > Convert-CIPPMailbox -CustomerTenantID "contoso.onmicrosoft.com" -UserID "user@domain.com" -MailboxType "Regular" ``` ```powershell PS > Convert-CIPPMailbox -CustomerTenantID "contoso.onmicrosoft.com" -UserID "room@domain.com" -MailboxType "Room" ``` -------------------------------- ### Add New Guest User Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPGuest.md Use this cmdlet to add a new guest user to a tenant. Ensure all mandatory parameters like CustomerTenantID, DisplayName, and EmailAddress are provided. Optional parameters like Message, RedirectURL, and SendInvite can customize the invitation process. ```powershell PS > Add-CIPPGuest -CustomerTenantID "contoso.onmicrosoft.com" -DisplayName "John Partner" -EmailAddress "john@partner.com" -Message "Welcome to our collaboration project" -RedirectURL "https://teams.microsoft.com" ``` -------------------------------- ### Reset MFA using Tenant GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Reset-CIPPUserMFA.md Resets MFA for a user identified by their User Principal Name within a tenant specified by its unique GUID. ```powershell Reset-CIPPUserMFA -CustomerTenantID "7a90b7e8-5f9a-4c3d-8b2e-1a3f5c7d9e2b" -UserPrincipalName "jane.smith@contoso.com" ``` -------------------------------- ### Retrieve GDAP Invites Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPGDAPInvite.md Use these examples to fetch either all GDAP invites or a specific one by its relationship ID. ```powershell PS > Get-CIPPGDAPInvite ``` ```powershell PS > Get-CIPPGDAPInvite -RelationshipId "12345678-1234-1234-1234-1234567890AB" ``` -------------------------------- ### Disable a Spam Filter with GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Set-CIPPSpamFilter.md This command disables a spam filter using its unique identifier (Guid). This is useful when you need to target a specific instance of a spam filter. ```powershell PS > Set-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" -Guid "abcdefg" -Name "SpamFilter2" -State "Disable" ``` -------------------------------- ### Retrieve CIPP Tenant Details by GUID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPTenantDetails.md Use this command to retrieve details for a specific CIPP tenant when you have its unique GUID. Ensure the CustomerTenantID is correctly formatted as a string. ```powershell PS > Get-CIPPTenantDetails -CustomerTenantID "7ced1621-b8f7-4231-868c-bc6b1a2f1778" ``` -------------------------------- ### Create Temporary Access Pass with Tenant ID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/New-CIPPTemporaryAccessPass.md Use this cmdlet to create a Temporary Access Pass for a user, specifying the customer tenant ID using its GUID and the user's GUID. ```powershell New-CIPPTemporaryAccessPass -CustomerTenantID "1a2b3c4d-1234-1234-1234-1a2b3c4d5e6f" -UserID "1a2b3c4d-1234-1234-1234-1a2b3c4d5e6f" ``` -------------------------------- ### Retrieve Specific Equipment by ID Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPEquipment.md Use this example to retrieve a single, specific equipment record by its ID for a given customer tenant. Both CustomerTenantID and EquipmentID parameters are required. ```powershell PS > # Retrieve a specific equipment item for a tenant ``` -------------------------------- ### GET /api/GetVersion Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPVersion.md Retrieves the current version of the CIPP application. ```APIDOC ## GET /api/GetVersion ### Description Retrieves the version of the CIPP application. ### Method GET ### Endpoint /api/GetVersion ### Parameters #### Query Parameters - **LocalVersion** (Version) - Required - The local version identifier. ``` -------------------------------- ### User Creation Parameters Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPUser.md This section details the parameters required for creating a new user within a customer tenant using the CIPP API. It outlines mandatory and optional fields, their types, and descriptions. ```APIDOC ## POST /api/users ### Description Creates a new user within a specified customer tenant. ### Method POST ### Endpoint /api/users ### Parameters #### Request Body - **CustomerTenantID** (String) - Required - The ID of the customer tenant to which the user will be added. - **DisplayName** (String) - Required - The display name of the user. - **UserName** (String) - Required - The username of the user. - **AutoPassword** (Boolean) - Optional - Specifies whether to automatically generate a password for the user. Default value is true. - **FirstName** (String) - Required - The first name of the user. - **LastName** (String) - Required - The last name of the user. - **Domain** (String) - Required - The domain of the user. - **AddedAliases** (String) - Optional - Additional aliases for the user. - **CopyFrom** (String) - Optional - Specifies the user to copy settings from. - **UsageLocation** (String) - Required - The usage location of the user. - **Department** (String) - Optional - The department of the user. - **City** (String) - Optional - The city of the user. - **Country** (String) - Optional - The country of the user. - **Jobtitle** (String) - Optional - The job title of the user. - **MobilePhone** (String) - Optional - The mobile phone number of the user. - **BusinessPhone** (String) - Optional - The business phone number of the user. - **StreetAddress** (String) - Optional - The street address of the user. - **PostalCode** (String) - Optional - The postal code of the user. - **CompanyName** (String) - Optional - The company name of the user. - **Manager** (String) - Optional - The manager of the user. Either the UserPrincipalName (UPN) or the ID of the manager. - **MustChangePass** (Boolean) - Optional - Specifies whether the user must change their password on first login. Default value is true. - **ScheduledFor** (DateTime) - Optional - Specifies the date and time when the user should be added. If not specified, the user will be added immediately. Input should be a valid datetime object. Will be converted to Unix time. - **SendResultsToEmail** (SwitchParameter) - Optional - Specifies whether to send the results of the scheduled task to the email address specified in the notification settings of your CIPP instance. Default value is false. - **SendResultsToPSA** (SwitchParameter) - Optional - Specifies whether to send the results of the scheduled task to the PSA. ### Request Example ```json { "CustomerTenantID": "string", "DisplayName": "string", "UserName": "string", "AutoPassword": true, "FirstName": "string", "LastName": "string", "Domain": "string", "AddedAliases": "string", "CopyFrom": "string", "UsageLocation": "string", "Department": "string", "City": "string", "Country": "string", "Jobtitle": "string", "MobilePhone": "string", "BusinessPhone": "string", "StreetAddress": "string", "PostalCode": "string", "CompanyName": "string", "Manager": "string", "MustChangePass": true, "ScheduledFor": "2023-10-27T10:00:00Z", "SendResultsToEmail": true, "SendResultsToPSA": true } ``` ### Response #### Success Response (200) - **message** (String) - A confirmation message indicating the user was created successfully. #### Response Example ```json { "message": "User created successfully." } ``` ``` -------------------------------- ### Configure Password Expiration Policy Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Set-CIPPPasswordNeverExpires.md Examples demonstrating how to set a user's password policy to either never expire or revert to the tenant default. ```powershell Set-CIPPPasswordNeverExpires -CustomerTenantID "contoso.onmicrosoft.com" -UserId "12345678-1234-1234-1234-123456789abc" -UserPrincipalName "john.doe@contoso.com" -PasswordPolicy "DisablePasswordExpiration" ``` ```powershell Set-CIPPPasswordNeverExpires -CustomerTenantID "contoso.onmicrosoft.com" -UserId "12345678-1234-1234-1234-123456789abc" -UserPrincipalName "jane.smith@contoso.com" -PasswordPolicy "None" ``` -------------------------------- ### GET /api/execuniversalsearch Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPUniversalSearch.md Performs a universal search for a specified name. ```APIDOC ## GET /api/execuniversalsearch ### Description Performs a universal search for a specified name by making a REST API call. ### Method GET ### Endpoint /api/execuniversalsearch ### Parameters #### Query Parameters - **Name** (String) - Required - The name to search for. ### Request Example ```powershell PS > Get-CIPPUniversalSearch -Name "John Doe" ``` ### Response #### Success Response (200) - **results** (Array) - A list of search results. - **message** (String) - A confirmation message. #### Response Example ```json { "results": [ { "id": "123", "name": "John Doe", "type": "Person" } ], "message": "Search completed successfully." } ``` ``` -------------------------------- ### Add-CIPPTeam Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPTeam.md Creates a new team site in the specified customer tenant. ```APIDOC ## Add-CIPPTeam ### Description Adds a new team site to the specified customer tenant using the provided display name, description, visibility, and owner. ### Parameters - **CustomerTenantID** (String) - Required - The ID of the customer tenant where the team site will be added. Can be the tenant ID or default domain name. - **DisplayName** (String) - Required - The display name of the new team site. - **Description** (String) - Optional - A description for the new team site. - **Visibility** (String) - Required - The visibility setting for the new team site (e.g., Public or Private). - **Owner** (String) - Required - The owner of the new team site. Should be a valid user principal name (UPN) with a teams license assigned. ### Request Example Add-CIPPTeam -CustomerTenantID "9d606831-a394-4d1a-b508-260f428807a4" -DisplayName "Engineering Team" -Description "Team for engineering department" -Visibility "Private" -Owner "john.doe@example.com" ``` -------------------------------- ### GET /api/listrooms Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPRooms.md Retrieves rooms for a specific customer tenant. ```APIDOC ## GET /api/listrooms ### Description Retrieves rooms for a specific customer tenant. ### Method GET ### Endpoint /api/listrooms ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - Specifies the ID of the customer tenant. - **RoomID** (String) - Optional - Specifies the ID of the room. ### Request Example ```powershell GET /api/listrooms?CustomerTenantID=7ced1621-b8f7-4231-868c-bc6b1a2f1778 ``` ### Response #### Success Response (200) - **rooms** (Array) - A list of rooms associated with the customer tenant. - **roomId** (String) - The ID of the room. - **roomName** (String) - The name of the room. #### Response Example ```json { "rooms": [ { "roomId": "room123", "roomName": "Conference Room A" }, { "roomId": "room456", "roomName": "Office 101" } ] } ``` ``` -------------------------------- ### GET /api/getcippalerts Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPAlerts.md Retrieves a list of CIPP alerts from the API. ```APIDOC ## GET /api/getcippalerts ### Description Retrieves CIPP alerts from the API. ### Method GET ### Endpoint /api/getcippalerts ### Request Example Get-CIPPAlerts ``` -------------------------------- ### Add a new team site using Domain Name Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPTeam.md Creates a public team site using a domain name for the CustomerTenantID. ```powershell PS > Add-CIPPTeam -CustomerTenantID "exampleTenant.onmicrosoft.com" -DisplayName "Marketing Team" -Description "Team for marketing department" -Visibility "Public" -Owner "Jane.doe@example.com" ``` -------------------------------- ### Retrieve Onboarding Status for All Tenants from Report DB Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPDefenderOnboarding.md This snippet retrieves cached onboarding status for all tenants by querying the CIPP report database. It requires the -UseReportDB switch parameter and 'AllTenants' for the CustomerTenantID. ```powershell PS > Get-CIPPDefenderOnboarding -CustomerTenantID "AllTenants" -UseReportDB ``` -------------------------------- ### GET /api/listsharepointquota Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPSharePointQuota.md Retrieves the SharePoint quota for a specific customer tenant. ```APIDOC ## GET /api/listsharepointquota ### Description Retrieves the SharePoint quota for a specific customer tenant. ### Method GET ### Endpoint /api/listsharepointquota ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - The ID of the customer tenant for which the SharePoint quota needs to be retrieved. ### Request Example ```powershell GET /api/listsharepointquota?CustomerTenantID=contoso.onmicrosoft.com ``` ### Response #### Success Response (200) - **Quota** (Number) - The SharePoint quota for the tenant. - **Used** (Number) - The amount of SharePoint storage currently used. - **Available** (Number) - The amount of SharePoint storage available. #### Response Example ```json { "Quota": 10000000000, "Used": 5000000000, "Available": 5000000000 } ``` ``` -------------------------------- ### Add Exchange Connector using Template Name Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Add-CIPPExchConnector.md This example demonstrates how to add an Exchange Connector for a customer tenant by providing the template's name. The CustomerTenantDefaultDomain and TemplateName parameters are required for this operation. ```powershell Add-CIPPExchConnector -CustomerTenantDefaultDomain "example.com" -TemplateName "DefaultTemplate" ``` -------------------------------- ### GET /api/listroomlists Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPRoomLists.md Retrieves room lists for a specific customer tenant. ```APIDOC ## GET /api/listroomlists ### Description Retrieves room lists for a specific customer tenant. ### Method GET ### Endpoint /api/listroomlists ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - Specifies the ID of the customer tenant. ### Request Example GET /api/listroomlists?CustomerTenantID=7ced1621-b8f7-4231-868c-bc6b1a2f1778 ``` -------------------------------- ### GET /api/listpartnerrelationships Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPPartnerRelationships.md Retrieves partner relationships for a specified customer tenant. ```APIDOC ## GET /api/listpartnerrelationships ### Description Retrieves partner relationships for a specified customer tenant. ### Method GET ### Endpoint /api/listpartnerrelationships ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - The ID of the customer tenant for which to retrieve partner relationships. ### Request Example ```powershell GET /api/listpartnerrelationships?CustomerTenantID=7ced1621-b8f7-4231-868c-bc6b1a2f1778 ``` ### Response #### Success Response (200) - **partnerRelationships** (Array) - A list of partner relationships. - **partnerId** (String) - The ID of the partner. - **partnerName** (String) - The name of the partner. - **relationshipType** (String) - The type of relationship. #### Response Example ```json { "partnerRelationships": [ { "partnerId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "partnerName": "Example Partner", "relationshipType": "Reseller" } ] } ``` ``` -------------------------------- ### GET /api/listphishpolicies Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPPhishPolicies.md Retrieves the phishing policies for a specific customer tenant. ```APIDOC ## GET /api/listphishpolicies ### Description Retrieves the phishing policies for a specific customer tenant. ### Method GET ### Endpoint /api/listphishpolicies ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - The ID of the customer tenant for which to retrieve the phishing policies. ### Request Example GET /api/listphishpolicies?CustomerTenantID=contoso.onmicrosoft.com ``` -------------------------------- ### Get-CIPPApplicationQueue Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPApplicationQueue.md Retrieves a list of applications from the queue for a specific customer. ```APIDOC ## GET Get-CIPPApplicationQueue ### Description The Get-CIPPApplicationQueue function retrieves a list of applications from the queue for a specific customer identified by their tenant ID. ### Method GET ### Endpoint Get-CIPPApplicationQueue ### Request Example PS > Get-CIPPApplicationQueue ``` -------------------------------- ### GET /api/listoauthapps Source: https://github.com/bnwein/cippapimodule/blob/main/Docs/Get-CIPPOAuthApps.md Retrieves OAuth apps for a specific customer tenant. ```APIDOC ## GET /api/listoauthapps ### Description Retrieves OAuth apps for a specific customer tenant. ### Method GET ### Endpoint /api/listoauthapps ### Parameters #### Query Parameters - **CustomerTenantID** (String) - Required - The ID of the customer tenant for which to retrieve OAuth apps. ### Request Example ```json { "CustomerTenantID": "7ced1621-b8f7-4231-868c-bc6b1a2f1778" } ``` ### Response #### Success Response (200) - **oauthApps** (Array) - A list of OAuth applications. - **appId** (String) - The ID of the OAuth app. - **appName** (String) - The name of the OAuth app. - **isEnabled** (Boolean) - Indicates if the app is enabled. #### Response Example ```json { "oauthApps": [ { "appId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "appName": "ExampleApp", "isEnabled": true } ] } ``` ```