### Start Print Share Job Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Devices.CloudPrint/v1.0/examples/Start-MgPrintShareJob.md This example demonstrates how to start a print job for a shared printer using the Start-MgPrintShareJob cmdlet. ```APIDOC ## Start-MgPrintShareJob ### Description Starts a print job for a printer share. ### Method POST ### Endpoint /print/shares/{printerShareId}/jobs ### Parameters #### Path Parameters - **printerShareId** (string) - Required - The unique identifier for the printer share. #### Query Parameters None #### Request Body - **printJob** (object) - Required - The print job to start. - **document** (object) - Optional - The document to be printed. - **contentBytes** (string) - Optional - The content of the document as a base64 encoded string. - **contentType** (string) - Optional - The content type of the document (e.g., "application/pdf"). - **printerId** (string) - Optional - The ID of the printer to use for the job. ### Request Example ```powershell $printerShareId = "your_printer_share_id" $printJobId = "your_print_job_id" # Assuming you have a document content and type defined $documentContent = Get-Content -Path "path/to/your/document.pdf" -Encoding Byte -ReadCount 0 $documentBytesBase64 = [System.Convert]::ToBase64String($documentContent) $printJobParams = @{ "document" = @{ "contentBytes" = $documentBytesBase64 "contentType" = "application/pdf" } } Start-MgPrintShareJob -PrinterShareId $printerShareId -PrintJob $printJobParams ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier for the created print job. - **status** (string) - The current status of the print job (e.g., "pending", "processing", "completed"). #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/shares/{printerShareId}/jobs/$entity", "id": "your_print_job_id", "status": "pending", "createdDateTime": "2023-10-27T10:00:00Z", "isPrinting": false, "isAcquiredByPrinter": false, "queueShortName": "queue1", "printerId": "printer1" } ``` ``` -------------------------------- ### Install an app in a team with consent to resource-specific permissions Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/New-MgTeamInstalledApp.md This example shows how to install a Teams app and grant consent to specific resource-specific permissions required by the app. ```APIDOC ## POST /teams/{team-id}/installedApps ### Description Installs an app in a Microsoft Team and provides consent to its resource-specific permissions. ### Method POST ### Endpoint /teams/{team-id}/installedApps ### Parameters #### Path Parameters - **team-id** (string) - Required - The ID of the team to install the app into. #### Request Body - **teamsApp@odata.bind** (string) - Required - The OData bind URL for the Teams app to install. - **consentedPermissionSet** (object) - Optional - Defines the permissions consented to for the app. - **resourceSpecificPermissions** (array) - Required if consentedPermissionSet is provided. - **permissionValue** (string) - Required - The name of the permission. - **permissionType** (string) - Required - The type of permission (e.g., 'delegated', 'application'). ### Request Example ```powershell Import-Module Microsoft.Graph.Teams $params = @{ "teamsApp@odata.bind" = "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785" consentedPermissionSet = @{ resourceSpecificPermissions = @( @{ permissionValue = "OnlineMeeting.ReadBasic.Chat" permissionType = "delegated" } @{ permissionValue = "ChatMessage.Read.Chat" permissionType = "application" } ) } } New-MgTeamInstalledApp -TeamId $teamId -BodyParameter $params ``` ### Response #### Success Response (201 Created) - **id** (string) - The ID of the installed app. - **teamsAppDefinition** (object) - Information about the installed Teams app. - **teamsApp** (object) - Link to the Teams app. - **consentedPermissionSet** (object) - The permissions consented to for the app. #### Response Example ```json { "id": "installedAppId", "teamsAppDefinition": { "id": "teamsAppDefinitionId" }, "teamsApp": { "@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785" }, "consentedPermissionSet": { "resourceSpecificPermissions": [ { "permissionValue": "OnlineMeeting.ReadBasic.Chat", "permissionType": "delegated" }, { "permissionValue": "ChatMessage.Read.Chat", "permissionType": "application" } ] } } ``` ``` -------------------------------- ### Install an app in a team Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/New-MgTeamInstalledApp.md This example demonstrates how to install a Microsoft Teams app into a specified team. ```APIDOC ## POST /teams/{team-id}/installedApps ### Description Installs an app in a Microsoft Team. ### Method POST ### Endpoint /teams/{team-id}/installedApps ### Parameters #### Path Parameters - **team-id** (string) - Required - The ID of the team to install the app into. #### Request Body - **teamsApp@odata.bind** (string) - Required - The OData bind URL for the Teams app to install. ### Request Example ```powershell Import-Module Microsoft.Graph.Teams $params = @{ "teamsApp@odata.bind" = "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/12345678-9abc-def0-123456789a" } New-MgTeamInstalledApp -TeamId $teamId -BodyParameter $params ``` ### Response #### Success Response (201 Created) - **id** (string) - The ID of the installed app. - **teamsAppDefinition** (object) - Information about the installed Teams app. - **teamsApp** (object) - Link to the Teams app. #### Response Example ```json { "id": "installedAppId", "teamsAppDefinition": { "id": "teamsAppDefinitionId" }, "teamsApp": { "@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/12345678-9abc-def0-123456789a" } } ``` ``` -------------------------------- ### Get Site Lists Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Sites/v1.0/examples/Get-MgSiteList.md This example demonstrates how to retrieve a list of sites using the Get-MgSiteList Cmdlet. ```APIDOC ## GET /sites/{site-id}/lists ### Description Retrieves a collection of list objects in a site. ### Method GET ### Endpoint /sites/{site-id}/lists ### Parameters #### Path Parameters - **site-id** (string) - Required - The unique identifier for the site. ### Request Example ```powershell Import-Module Microsoft.Graph.Sites Get-MgSiteList -SiteId "{site-id}" ``` ### Response #### Success Response (200) - **value** (array) - A collection of list objects. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('{site-id}')/lists", "value": [ { "id": "{list-id-1}", "displayName": "Documents", "createdDateTime": "2023-01-01T10:00:00Z", "lastModifiedDateTime": "2023-01-01T10:00:00Z" }, { "id": "{list-id-2}", "displayName": "Tasks", "createdDateTime": "2023-01-02T11:00:00Z", "lastModifiedDateTime": "2023-01-02T11:00:00Z" } ] } ``` ``` -------------------------------- ### Get-MgEnvironment Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Authentication/examples/Get-MgEnvironment.md This command gets a list of all available Microsoft Graph environments. ```powershell PS C:\> Get-MgEnvironment Name AzureADEndpoint GraphEndpoint Type ---- --------------- ------------- ---- BleuCloud https://login.sovcloud-identity.fr https://graph.svc.sovcloud.fr Built-in China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in DelosCloud https://login.sovcloud-identity.de https://graph.svc.sovcloud.de Built-in Global https://login.microsoftonline.com https://graph.microsoft.com Built-in GovSGCloud https://login.sovcloud-identity.sg https://graph.svc.sovcloud.sg Built-in USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in ``` -------------------------------- ### Get Site Page with Properties Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Sites/v1.0/examples/Get-MgSitePageAsSitePage.md This example shows how to retrieve a site page and specify which properties to return. ```APIDOC ## GET /sites/{site-id}/pages/{baseSitePage-id}?$select=id,name ### Description Retrieves a specific site page, selecting only the 'id' and 'name' properties. ### Method GET ### Endpoint /sites/{site-id}/pages/{baseSitePage-id} ### Query Parameters - **$select** (string) - Optional - Comma-separated list of properties to return. ### Request Example ```powershell Import-Module Microsoft.Graph.Sites Get-MgSitePageAsSitePage -SiteId $siteId -BaseSitePageId $baseSitePageId -Property "id,name" ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the site page. - **name** (string) - The name of the site page. #### Response Example ```json { "id": "some-page-id", "name": "Example Page" } ``` ``` -------------------------------- ### Get Workforce Integrations Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Get-MgTeamworkWorkforceIntegration.md This example demonstrates how to retrieve workforce integrations using the Get-MgTeamworkWorkforceIntegration cmdlet. ```APIDOC ## GET /teams/{team-id}/workforceIntegrations ### Description Retrieves a collection of workforce integrations for a specific team. ### Method GET ### Endpoint /teams/{team-id}/workforceIntegrations ### Parameters #### Path Parameters - **team-id** (string) - Required - The ID of the team. ### Request Example ```powershell Import-Module Microsoft.Graph.Teams Get-MgTeamworkWorkforceIntegration -TeamId "{team-id}" ``` ### Response #### Success Response (200) - **value** (array) - A collection of workforce integration objects. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams/{team-id}/workforceIntegrations", "value": [ { "@odata.type": "#microsoft.graph.workforceIntegration", "id": "some-integration-id", "displayName": "Example Integration", "apiVersion": "v1.0", "isEnabled": true, "isSoftDeleted": false, "lastModifiedDateTime": "2023-10-27T10:00:00Z", "priority": 100, "state": "enabled", "version": "1.0" } ] } ``` ``` -------------------------------- ### Get Planner Task Detail Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Planner/v1.0/examples/Get-MgPlannerTaskDetail.md This example demonstrates how to retrieve the details of a specific planner task using the Get-MgPlannerTaskDetail cmdlet. ```APIDOC ## GET /planner/tasks/{taskId}/details ### Description Retrieves the details of a specific planner task. ### Method GET ### Endpoint /planner/tasks/{taskId}/details ### Parameters #### Path Parameters - **taskId** (string) - Required - The ID of the planner task. ### Request Example ```powershell Import-Module Microsoft.Graph.Planner Get-MgPlannerTaskDetail -PlannerTaskId "your_planner_task_id" ``` ### Response #### Success Response (200) - **id** (string) - The ID of the planner task. - **title** (string) - The title of the planner task. - **description** (string) - The description of the planner task. - **previewType** (string) - The preview type of the task. - **checklist** (object) - The checklist items for the task. - **references** (object) - The references associated with the task. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#planner/tasks/$entity", "id": "your_planner_task_id", "title": "Task Title", "description": "Task Description", "previewType": "automatic", "checklist": {}, "references": {} } ``` ``` -------------------------------- ### Get Device App Management Configuration Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Devices.CorporateManagement/v1.0/examples/Get-MgDeviceAppManagement.md This example demonstrates how to retrieve the device app management configuration using the Get-MgDeviceAppManagement cmdlet. ```APIDOC ## Get Device App Management Configuration ### Description Retrieves the device app management configuration for the tenant. ### Method GET ### Endpoint /deviceAppManagement ### Parameters This cmdlet does not accept parameters. ### Request Example ```powershell Get-MgDeviceAppManagement ``` ### Response #### Success Response (200) - **value** (object[]) - A collection of device app management configurations. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#deviceAppManagement", "value": [ { "@odata.type": "#microsoft.graph.deviceConfiguration", "id": "some-device-configuration-id", "displayName": "Example Configuration", "description": "An example configuration for testing." } ] } ``` ``` -------------------------------- ### Get Booking Appointments Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Bookings/v1.0/examples/Get-MgBookingBusinessAppointment.md This example demonstrates how to retrieve all appointments for a specific booking business using the Get-MgBookingBusinessAppointment cmdlet. ```APIDOC ## Get Booking Appointments ### Description Retrieves a collection of appointment objects in a booking business. ### Method GET ### Endpoint /bookingBusinesses/{bookingBusiness-id}/appointments ### Parameters #### Path Parameters - **bookingBusiness-id** (string) - Required - The unique identifier for the booking business. ### Request Example ```powershell Import-Module Microsoft.Graph.Bookings Get-MgBookingBusinessAppointment -BookingBusinessId $bookingBusinessId ``` ### Response #### Success Response (200) - **value** (array) - A collection of booking appointment objects. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#bookingBusinesses('contoso%40contoso.com')/appointments", "value": [ { "@odata.etag": "W/\"Mw030y7N8/2=\", "id": "a1f3a7c2-1b2c-4d5e-8f9a-0b1c2d3e4f5a", "createdDateTime": "2023-10-27T10:00:00Z", "lastUpdatedDateTime": "2023-10-27T10:05:00Z", "start": { "time": "11:00:00.0000000", "timeZone": "UTC" }, "end": { "time": "11:30:00.0000000", "timeZone": "UTC" }, "isAnonymousInsert": false, "optOutOfCustomerEmail": false, "serviceId": "service-id-123", "staffMemberIds": [ "staff-id-456" ] } ] } ``` ``` -------------------------------- ### Get Cloud Print Connectors Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Devices.CloudPrint/v1.0/examples/Get-MgPrintConnector.md This example demonstrates how to retrieve a list of cloud print connectors using the Get-MgPrintConnector cmdlet. ```APIDOC ## Get-MgPrintConnector ### Description Retrieves a list of available cloud print connectors. ### Method GET ### Endpoint /print/connectors ### Parameters #### Query Parameters - **`$filter`** (string) - Optional - Filter the results using OData syntax. - **`$top`** (integer) - Optional - The maximum number of results to return. - **`$skip`** (integer) - Optional - The number of results to skip. - **`$select`** (string) - Optional - Select properties to be returned. - **`$orderby`** (string) - Optional - Order the results using OData syntax. ### Request Example ```powershell Import-Module Microsoft.Graph.Devices.CloudPrint Get-MgPrintConnector ``` ### Response #### Success Response (200) - **`value`** (array) - A collection of print connector objects. - **`id`** (string) - The unique identifier for the connector. - **`displayName`** (string) - The display name of the connector. - **`version`** (string) - The version of the connector software. - **`operationalStatus`** (string) - The operational status of the connector. - **`lastSeenDateTime`** (DateTime) - The timestamp when the connector was last seen. #### Response Example ```json { "value": [ { "@odata.type": "#microsoft.graph.printConnector", "id": "a1b2c3d4-e5f6-7777-8888-999900000000", "displayName": "MyOfficeConnector", "version": "1.0.1234.5", "operationalStatus": "active", "lastSeenDateTime": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Get Cloud Print Service Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Devices.CloudPrint/v1.0/examples/Get-MgPrintService.md This example demonstrates how to retrieve information about the cloud print service using the Get-MgPrintService cmdlet. ```APIDOC ## Get Cloud Print Service ### Description Retrieves information about the cloud print service. ### Method GET ### Endpoint /print/services ### Parameters #### Query Parameters - **`$filter`** (string) - Optional - Use this to filter the results. - **`$select`** (string) - Optional - Use this to select specific properties to return. ### Request Example ```powershell Import-Module Microsoft.Graph.Devices.CloudPrint Get-MgPrintService ``` ### Response #### Success Response (200) - **`id`** (string) - The unique identifier for the print service. - **`displayName`** (string) - The display name of the print service. - **`description`** (string) - A description of the print service. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/services/$entity", "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "displayName": "Contoso Print Service", "description": "Primary print service for Contoso Corporation" } ``` ``` -------------------------------- ### Get Default Drive for a Site Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Sites/v1.0/examples/Get-MgSiteDefaultDrive.md This example demonstrates how to retrieve the default drive associated with a specific site using the Get-MgSiteDefaultDrive cmdlet. ```APIDOC ## GET /sites/{site-id}/drive ### Description Retrieves the default drive of a site. ### Method GET ### Endpoint /sites/{site-id}/drive ### Parameters #### Path Parameters - **site-id** (string) - Required - The unique identifier for the site. ### Request Example ```powershell Import-Module Microsoft.Graph.Sites $siteId = "your-site-id" Get-MgSiteDefaultDrive -SiteId $siteId ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the drive. - **driveType** (string) - The type of the drive (e.g., "documentLibrary"). - **owner** (object) - Information about the owner of the drive. #### Response Example ```json { "id": "b!some_drive_id", "driveType": "documentLibrary", "owner": { "user": { "displayName": "Example User", "id": "user_id" } } } ``` ### Permissions To learn about the permissions required for this operation, see the [permissions reference](/graph/permissions-reference). ``` -------------------------------- ### Get Resource Specific Permissions for Installed App - PowerShell Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Get-MgTeamInstalledApp.md Retrieves the resource-specific permissions that have been consented for an application installed in a particular team. This example uses the -Property 'consentedPermissionSet,id' parameter with the Get-MgTeamInstalledApp cmdlet. ```powershell Import-Module Microsoft.Graph.Teams Get-MgTeamInstalledApp -TeamId $teamId -TeamsAppInstallationId $teamsAppInstallationId -Property "consentedPermissionSet,id" ``` -------------------------------- ### Execute Example 1 Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Users/v1.0/examples/Get-MgUserTodoListTaskAttachmentContent.md Placeholder for the first example implementation. ```powershell PS C:\> {{ Add code here }} {{ Add output here }} ``` -------------------------------- ### Initialize-MgBackupRestoreServiceApp Cmdlet Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Bookings/v1.0/examples/Initialize-MgBackupRestoreServiceApp.md This example demonstrates how to use the Initialize-MgBackupRestoreServiceApp cmdlet to initialize the Bookings service application. ```APIDOC ## POST /users/{id}/initializeBackupRestoreService ### Description Initializes the Microsoft Graph Bookings service application. ### Method POST ### Endpoint /users/{id}/initializeBackupRestoreService ### Parameters #### Path Parameters - **id** (string) - Required - The user ID or service principal ID. #### Query Parameters None #### Request Body - **effectiveDateTime** (DateTime) - Required - The effective date and time for the initialization. ### Request Example ```powershell Import-Module Microsoft.Graph.Bookings $params = @{ effectiveDateTime = [System.DateTime]::Parse("2024-04-19T12:01:03.45Z") } Initialize-MgBackupRestoreServiceApp -ServiceAppId $serviceAppId -BodyParameter $params ``` ### Response #### Success Response (200) Indicates that the service application was initialized successfully. #### Response Example (No specific response body is detailed in the provided text, typically an empty body or a success status is returned for initialization operations.) ``` -------------------------------- ### Get Resource-Specific Permissions for Installed App - PowerShell Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Get-MgChatInstalledApp.md Retrieves the resource-specific permissions consented for an app installed in a specified chat. This example demonstrates how to select specific properties like 'consentedPermissionSet' and 'id'. It requires the chat ID and Teams app installation ID. ```powershell Import-Module Microsoft.Graph.Teams Get-MgChatInstalledApp -ChatId $chatId -TeamsAppInstallationId $teamsAppInstallationId -Property "consentedPermissionSet,id" ``` -------------------------------- ### Get Group Transitive Members with Filter Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Groups/v1.0/examples/Get-MgGroupTransitiveMemberAsUser.md This example demonstrates how to retrieve transitive members of a group, filtering for members whose display name starts with 'a'. ```APIDOC ## Get-MgGroupTransitiveMemberAsUser - Filter ### Description Retrieves transitive members of a group, filtered by a condition on the display name. ### Method GET ### Endpoint /groups/{group-id}/transitiveMembers/$ref ### Parameters #### Path Parameters - **groupId** (string) - Required - The ID of the group. #### Query Parameters - **CountVariable** (string) - Optional - Variable to store the count of objects returned. - **Sort** (string) - Optional - Sorts the results by a specified property. Example: "displayName" - **Filter** (string) - Optional - Filters the results based on a OData filter expression. Example: "startswith(displayName, 'a')" - **ConsistencyLevel** (string) - Optional - Specifies the consistency level required for the request. Example: "eventual" ### Request Example ```powershell Import-Module Microsoft.Graph.Groups $groupId = "your-group-id" Get-MgGroupTransitiveMemberAsUser -GroupId $groupId -CountVariable CountVar -Sort "displayName" -Filter "startswith(displayName, 'a')" -ConsistencyLevel eventual ``` ### Response #### Success Response (200) Returns a collection of user objects that are transitive members of the group. #### Response Example (Response body will contain a collection of user objects) ``` -------------------------------- ### Initiate Remote Assistance Partner Onboarding - PowerShell Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/DeviceManagement.Actions/v1.0/examples/Invoke-MgBeginDeviceManagementRemoteAssistancePartnerOnboarding.md This snippet demonstrates how to initiate the onboarding process for a remote assistance partner using the Invoke-MgBeginDeviceManagementRemoteAssistancePartnerOnboarding cmdlet. It requires the Microsoft.Graph.DeviceManagement.Actions module and a partner ID as input. ```powershell Import-Module Microsoft.Graph.DeviceManagement.Actions Invoke-MgBeginDeviceManagementRemoteAssistancePartnerOnboarding -RemoteAssistancePartnerId $remoteAssistancePartnerId ``` -------------------------------- ### Start-MgCommunicationCallParticipantHoldMusic Cmdlet Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/CloudCommunications/v1.0/examples/Start-MgCommunicationCallParticipantHoldMusic.md This example demonstrates how to place a participant on hold with custom music using the Start-MgCommunicationCallParticipantHoldMusic cmdlet. ```APIDOC ## POST /communications/calls/{callId}/participants/{participantId}/holdMusic ### Description Places a participant on hold with custom music during a call. ### Method POST ### Endpoint /communications/calls/{callId}/participants/{participantId}/holdMusic ### Parameters #### Path Parameters - **callId** (string) - Required - The ID of the call. - **participantId** (string) - Required - The ID of the participant to place on hold. #### Request Body - **customPrompt** (object) - Optional - Specifies the custom prompt to play for the held participant. - **@odata.type** (string) - Required - The OData type identifier, expected to be '#microsoft.graph.mediaPrompt'. - **mediaInfo** (object) - Required - Information about the media to be played. - **@odata.type** (string) - Required - The OData type identifier, expected to be '#microsoft.graph.mediaInfo'. - **uri** (string) - Required - The URI of the media to be played (e.g., a WAV file). - **clientContext** (string) - Required - A unique identifier for the client request. ### Request Example ```powershell Import-Module Microsoft.Graph.CloudCommunications $params = @{ customPrompt = @{ "@odata.type" = "#microsoft.graph.mediaPrompt" mediaInfo = @{ "@odata.type" = "#microsoft.graph.mediaInfo" uri = "https://bot.contoso.com/onHold.wav" } } clientContext = "d45324c1-fcb5-430a-902c-f20af696537c" } Start-MgCommunicationCallParticipantHoldMusic -CallId $callId -ParticipantId $participantId -BodyParameter $params ``` ### Response #### Success Response (204) No content is returned upon successful execution. #### Response Example (No response body for 204) ``` -------------------------------- ### Create Windows Information Protection Network Learning Summary Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/DeviceManagement/v1.0/examples/New-MgDeviceManagementWindowsInformationProtectionNetworkLearningSummary.md This example demonstrates how to create a new Windows Information Protection network learning summary using the New-MgDeviceManagementWindowsInformationProtectionNetworkLearningSummary cmdlet. ```APIDOC ## POST /deviceManagement/windowsInformationProtectionNetworkLearningSummaries ### Description Creates a new windowsInformationProtectionNetworkLearningSummary. ### Method POST ### Endpoint /deviceManagement/windowsInformationProtectionNetworkLearningSummaries ### Parameters #### Request Body - **@odata.type** (string) - Required - The OData type of the object. - **url** (string) - Optional - The URL associated with the network learning summary. - **deviceCount** (integer) - Optional - The count of devices associated with the network learning summary. ### Request Example ```powershell Import-Module Microsoft.Graph.DeviceManagement $params = @{ "@odata.type" = "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary" url = "Url value" deviceCount = 11 } New-MgDeviceManagementWindowsInformationProtectionNetworkLearningSummary -BodyParameter $params ``` ### Response #### Success Response (201 Created) - **id** (string) - The ID of the newly created network learning summary. - **url** (string) - The URL associated with the network learning summary. - **deviceCount** (integer) - The count of devices associated with the network learning summary. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#deviceManagement/windowsInformationProtectionNetworkLearningSummaries/$entity", "id": "some-guid-id", "url": "Url value", "deviceCount": 11 } ``` ``` -------------------------------- ### Get Installed App in Chat - PowerShell Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Get-MgChatInstalledApp.md Retrieves an app installed in a specified chat. This requires the chat ID and the Teams app installation ID. It utilizes the Microsoft.Graph.Teams module. ```powershell Import-Module Microsoft.Graph.Teams Get-MgChatInstalledApp -ChatId $chatId -TeamsAppInstallationId $teamsAppInstallationId ``` -------------------------------- ### Create Windows Hello for Business Configuration via PowerShell Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/DeviceManagement.Enrollment/v1.0/examples/New-MgDeviceManagementDeviceEnrollmentConfiguration.md This snippet demonstrates how to initialize a parameter hash table and invoke the New-MgDeviceManagementDeviceEnrollmentConfiguration cmdlet. It configures various security settings such as PIN requirements, biometric usage, and state for device enrollment. ```powershell Import-Module Microsoft.Graph.DeviceManagement.Enrollment $params = @{ "@odata.type" = "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration" displayName = "Display Name value" description = "Description value" priority = 8 version = 7 pinMinimumLength = $null pinMaximumLength = $null pinUppercaseCharactersUsage = "required" pinLowercaseCharactersUsage = "required" pinSpecialCharactersUsage = "required" state = "enabled" securityDeviceRequired = $true unlockWithBiometricsEnabled = $true remotePassportEnabled = $true pinPreviousBlockCount = $null pinExpirationInDays = $null enhancedBiometricsState = "enabled" } New-MgDeviceManagementDeviceEnrollmentConfiguration -BodyParameter $params ``` -------------------------------- ### Get Deleted Chat Example Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Get-MgTeamworkDeletedChat.md This example demonstrates how to retrieve a specific deleted chat using the Get-MgTeamworkDeletedChat cmdlet from the Microsoft.Graph.Teams module. ```APIDOC ## GET /chats/{chat-id}/restore ### Description Retrieves a specific deleted chat. ### Method GET ### Endpoint /chats/{chat-id}/restore ### Parameters #### Path Parameters - **deletedChatId** (String) - Required - The ID of the deleted chat to retrieve. ### Request Example ```powershell Import-Module Microsoft.Graph.Teams Get-MgTeamworkDeletedChat -DeletedChatId $deletedChatId ``` ### Response #### Success Response (200) - **chat** (Object) - Information about the deleted chat. #### Response Example ```json { "id": "string", "chatType": "string", "topic": "string", "createdDateTime": "DateTime", "lastUpdatedDateTime": "DateTime", "members": [ { "id": "string", "displayName": "string", "email": "string" } ] } ``` ``` -------------------------------- ### Create Device Management Partner Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/DeviceManagement.Administration/v1.0/examples/New-MgDeviceManagementPartner.md This example demonstrates how to create a new device management partner by providing the necessary parameters to the New-MgDeviceManagementPartner cmdlet. ```APIDOC ## POST /deviceManagement/deviceManagementPartners ### Description Creates a new device management partner. ### Method POST ### Endpoint /deviceManagement/deviceManagementPartners ### Parameters #### Request Body - **@odata.type** (string) - Required - The OData type of the object, expected to be "#microsoft.graph.deviceManagementPartner". - **lastHeartbeatDateTime** (DateTime) - Required - The date and time the partner last sent a heartbeat. - **partnerState** (string) - Required - The state of the partner. Possible values: "unavailable", "available", "pending", "unhealthy". - **partnerAppType** (string) - Required - The type of the partner application. Possible values: "unknown", "singleTenantApp", "multiTenantApp", "delegatedAdminCustomerTenant". - **singleTenantAppId** (string) - Optional - The application ID of the partner's single tenant application. - **displayName** (string) - Required - The display name of the partner. - **isConfigured** (boolean) - Required - Indicates whether the partner is configured. - **whenPartnerDevicesWillBeRemovedDateTime** (DateTime) - Optional - The date and time when partner devices will be removed. - **whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime** (DateTime) - Optional - The date and time when partner devices will be marked as non-compliant. - **groupsRequiringPartnerEnrollment** (array) - Optional - A list of device management partner assignments that specify which groups require enrollment through the partner. - **@odata.type** (string) - Required - The OData type of the assignment target, expected to be "microsoft.graph.deviceManagementPartnerAssignment". - **target** (object) - Required - The assignment target. - **@odata.type** (string) - Required - The OData type of the target, expected to be "microsoft.graph.configurationManagerCollectionAssignmentTarget". - **collectionId** (string) - Required - The ID of the Configuration Manager collection. ``` -------------------------------- ### Remove User Teamwork Installed App Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Remove-MgUserTeamworkInstalledApp.md This example demonstrates how to remove an installed application for a user in Microsoft Teams using the Remove-MgUserTeamworkInstalledApp cmdlet. ```APIDOC ## Remove-MgUserTeamworkInstalledApp ### Description Removes an installed application for a user in Microsoft Teams. ### Method DELETE ### Endpoint DELETE /users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id} ### Parameters #### Path Parameters - **UserId** (string) - Required - The unique identifier for the user. - **UserScopeTeamsAppInstallationId** (string) - Required - The unique identifier for the Teams app installation. ### Request Example ```powershell Import-Module Microsoft.Graph.Teams Remove-MgUserTeamworkInstalledApp -UserId $userId -UserScopeTeamsAppInstallationId $userScopeTeamsAppInstallationId ``` ### Response #### Success Response (204 No Content) This endpoint does not return a response body on success. #### Response Example (No content) ``` -------------------------------- ### List All Sign-ins Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Reports/v1.0/examples/Get-MgAuditLogSignIn.md This example demonstrates how to list all sign-in events using the Get-MgAuditLogSignIn cmdlet. ```APIDOC ## GET /auditLogs/signIns ### Description Retrieves a list of all sign-in events recorded in the Microsoft Graph audit logs. ### Method GET ### Endpoint /auditLogs/signIns ### Parameters #### Query Parameters - **filter** (string) - Optional - Filter results using OData syntax. For example, `startsWith(appDisplayName,'Graph')`. - **top** (integer) - Optional - The number of records to return. For example, `10`. ### Request Example ```powershell Import-Module Microsoft.Graph.Reports Get-MgAuditLogSignIn ``` ### Response #### Success Response (200) - **value** (array) - An array of sign-in objects. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#auditLogs/signIns", "value": [ { "id": "12345", "createdDateTime": "2023-10-27T10:00:00Z", "userDisplayName": "Adele Vance", "userPrincipalName": "AdeleV@contoso.com", "ipAddress": "192.168.1.100", "userAgent": { "browser": "Chrome", "platform": "Windows", "version": "118.0.0.0" }, "appId": "00000003-0000-0000-c000-000000000000", "appDisplayName": "Microsoft Graph PowerShell", "signInResourceTenant": "contoso.com", "resourceDisplayName": "Microsoft Graph", "resourceId": "00000003-0000-0000-c000-000000000000", "authenticationRequirement": "singleFactorAuthentication", "authenticationProtocol": "Oauth2", "status": { "errorCode": 0, "failureReason": "Success", "additionalDetails": "" }, "conditionalAccessStatus": "notApplied", "riskLevelDuringSignIn": "none", "riskLevelDuringSignOut": "none", "riskStateDuringSignIn": "none", "riskStateDuringSignOut": "none", "isInteractive": true, "isTenantRestricted": false, "mfaDetail": null, "authenticationProcessingDetails": "" } ] } ``` ``` -------------------------------- ### Get Installed App Details - PowerShell Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Get-MgTeamInstalledApp.md Retrieves basic information about an installed application in a specified team. This requires the Team ID and the specific App Installation ID. It imports the necessary module and executes the Get-MgTeamInstalledApp cmdlet. ```powershell Import-Module Microsoft.Graph.Teams Get-MgTeamInstalledApp -TeamId $teamId -TeamsAppInstallationId $teamsAppInstallationId ``` -------------------------------- ### Get-MgDrive Cmdlet Example Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Files/v1.0/examples/Get-MgDrive.md This example demonstrates how to retrieve information about a specific drive using the Get-MgDrive cmdlet from the Microsoft.Graph.Files module. ```APIDOC ## Get Drive Information ### Description Retrieves information about a specific drive. ### Method GET ### Endpoint /drives/{drive-id} ### Parameters #### Path Parameters - **drive-id** (string) - Required - The unique identifier for the drive. ### Request Example ```powershell Import-Module Microsoft.Graph.Files $driveId = "your_drive_id" Get-MgDrive -DriveId $driveId ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the drive. - **driveType** (string) - The type of the drive (e.g., personal, documentLibrary). - **owner** (object) - Information about the owner of the drive. #### Response Example ```json { "id": "your_drive_id", "driveType": "personal", "owner": { "user": { "displayName": "John Doe", "id": "user_id" } } } ``` **Note:** To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). ``` -------------------------------- ### Instantiate Application Template Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Applications/v1.0/examples/Invoke-MgInstantiateApplicationTemplate.md This example demonstrates how to instantiate an application template using the Invoke-MgInstantiateApplicationTemplate cmdlet in PowerShell. It shows the necessary parameters and how to pass them. ```APIDOC ## POST /applicationTemplates/{applicationTemplateId}/instantiate ### Description Instantiates an application template, which deploys a pre-defined application configuration to your Azure AD tenant. This is useful for setting up common application scenarios like SAML SSO. ### Method POST ### Endpoint /applicationTemplates/{applicationTemplateId}/instantiate ### Parameters #### Path Parameters - **applicationTemplateId** (string) - Required - The ID of the application template to instantiate. #### Query Parameters None #### Request Body - **displayName** (string) - Optional - The display name for the newly instantiated application. ### Request Example ```powershell Import-Module Microsoft.Graph.Applications $params = @{ displayName = "Azure AD SAML Toolkit" } Invoke-MgInstantiateApplicationTemplate -ApplicationTemplateId $applicationTemplateId -BodyParameter $params ``` ### Response #### Success Response (200) - **id** (string) - The ID of the newly created application. - **displayName** (string) - The display name of the newly created application. #### Response Example ```json { "id": "", "displayName": "Azure AD SAML Toolkit" } ``` ``` -------------------------------- ### Retrieve First 10 Sign-ins to Apps Starting with 'Graph' Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Reports/v1.0/examples/Get-MgAuditLogSignIn.md This example retrieves the first 10 sign-in events for applications whose display name starts with 'Graph'. ```APIDOC ## GET /auditLogs/signIns?$filter=startsWith(appDisplayName,'Graph')&$top=10 ### Description Retrieves a list of sign-in events, specifically targeting applications whose display name begins with 'Graph', and limits the results to the first 10 entries. ### Method GET ### Endpoint /auditLogs/signIns ### Parameters #### Query Parameters - **filter** (string) - Required - Filter results using OData syntax. This example uses `startsWith(appDisplayName,'Graph')` to find apps with names starting with 'Graph'. - **top** (integer) - Required - The number of records to return. This example uses `10` to retrieve the first 10 sign-ins. ### Request Example ```powershell Import-Module Microsoft.Graph.Reports Get-MgAuditLogSignIn -Filter "startsWith(appDisplayName,'Graph')" -Top 10 ``` ### Response #### Success Response (200) - **value** (array) - An array of sign-in objects matching the filter criteria, limited by the top parameter. #### Response Example ```json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#auditLogs/signIns", "value": [ { "id": "67890", "createdDateTime": "2023-10-27T10:05:00Z", "userDisplayName": "Alex Wilber", "userPrincipalName": "AlexW@contoso.com", "ipAddress": "10.0.0.5", "userAgent": { "browser": "Edge", "platform": "Windows", "version": "118.0.0.0" }, "appId": "abcdef12-3456-7890-abcd-ef1234567890", "appDisplayName": "Microsoft Graph Explorer", "signInResourceTenant": "contoso.com", "resourceDisplayName": "Microsoft Graph", "resourceId": "00000003-0000-0000-c000-000000000000", "authenticationRequirement": "singleFactorAuthentication", "authenticationProtocol": "Oauth2", "status": { "errorCode": 0, "failureReason": "Success", "additionalDetails": "" }, "conditionalAccessStatus": "notApplied", "riskLevelDuringSignIn": "low", "riskLevelDuringSignOut": "none", "riskStateDuringSignIn": "remediated", "riskStateDuringSignOut": "none", "isInteractive": true, "isTenantRestricted": false, "mfaDetail": null, "authenticationProcessingDetails": "" } ] } ``` ``` -------------------------------- ### Update-MgTeamInstalledApp Cmdlet Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/Teams/v1.0/examples/Update-MgTeamInstalledApp.md This example demonstrates how to update an installed application for a Microsoft Team using the Update-MgTeamInstalledApp cmdlet. It requires the Team ID and the specific Teams App Installation ID. ```APIDOC ## Update-MgTeamInstalledApp ### Description Updates an installed application for a Microsoft Team. ### Method POST ### Endpoint /teams/{team-id}/installedApps/{teamsAppInstallation-id} ### Parameters #### Path Parameters - **team-id** (string) - Required - The unique identifier for the team. - **teamsAppInstallation-id** (string) - Required - The unique identifier for the specific app installation within the team. #### Query Parameters None #### Request Body This cmdlet does not typically require a request body for updating an app installation, but specific update operations might involve parameters passed directly. ### Request Example ```powershell Import-Module Microsoft.Graph.Teams Update-MgTeamInstalledApp -TeamId $teamId -TeamsAppInstallationId $teamsAppInstallationId ``` ### Response #### Success Response (204 No Content) Indicates that the application installation was successfully updated. #### Response Example (No content is returned on success) ``` -------------------------------- ### Create Cloud PC Provisioning Policy using PowerShell Source: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/main/src/DeviceManagement.Administration/v1.0/examples/New-MgDeviceManagementVirtualEndpointProvisioningPolicy.md This snippet demonstrates how to initialize a parameter hash table and invoke the New-MgDeviceManagementVirtualEndpointProvisioningPolicy cmdlet. It configures domain join settings, image selection, and provisioning types for a virtual endpoint. ```powershell Import-Module Microsoft.Graph.DeviceManagement.Administration $params = @{ "@odata.type" = "#microsoft.graph.cloudPcProvisioningPolicy" description = "Description value" displayName = "Display Name value" domainJoinConfigurations = @( @{ onPremisesConnectionId = "16ee6c71-fc10-438b-88ac-daa1ccafffff" domainJoinType = "hybridAzureADJoin" } @{ onPremisesConnectionId = "26e16c71-f210-438b-88ac-d481ccafffff" domainJoinType = "hybridAzureADJoin" } ) id = "1d164206-bf41-4fd2-8424-a3192d39ffff" enableSingleSignOn = $true imageDisplayName = "Windows-10 19h1-evd" imageId = "MicrosoftWindowsDesktop_Windows-10_19h1-evd" imageType = "gallery" windowsSetting = @{ locale = "en-US" } provisioningType = "dedicated" } New-MgDeviceManagementVirtualEndpointProvisioningPolicy -BodyParameter $params ```