### Microsoft Graph Quick Start Guide
Source: https://learn.microsoft.com/en-us/graph/api/resources/itememail_view=graph-rest-beta
A guide to help developers get started quickly with Microsoft Graph, covering essential steps like setting up authentication and making the first API call.
```text
Quick start
```
--------------------------------
### Microsoft Graph Quick Start Guide
Source: https://learn.microsoft.com/en-us/graph/permissions-overview_source=recommendations
A step-by-step guide to get you started quickly with Microsoft Graph. This typically involves setting up a basic application and making your first API call.
```text
Quick start
```
--------------------------------
### Install Core MGT Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the core Microsoft Graph Toolkit package, which includes all preceding packages and re-exports them for convenient installation and usage.
```bash
npm install @microsoft/mgt
```
--------------------------------
### Install Core MGT Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the core Microsoft Graph Toolkit package, which includes all preceding packages and re-exports them for convenient installation and usage.
```bash
npm install @microsoft/mgt
```
--------------------------------
### Quick Start with Microsoft Graph
Source: https://learn.microsoft.com/en-us/graph/api/resources/policyuserscope_view=graph-rest-1
A quick start guide to help developers begin using the Microsoft Graph API, covering initial setup and basic operations.
```General
Quick start
```
--------------------------------
### Microsoft Graph Quick Start Guide
Source: https://learn.microsoft.com/en-us/graph/permissions-overview_view=graph-rest-1
A step-by-step guide to get you started quickly with Microsoft Graph. This typically involves setting up a basic application and making your first API call.
```text
Quick start
```
--------------------------------
### Quick Start with Microsoft Graph
Source: https://learn.microsoft.com/en-us/graph/api/resources/policylocationurl_view=graph-rest-1
A quick start guide to help developers begin using the Microsoft Graph API, covering initial setup and basic operations.
```General
Quick start
```
--------------------------------
### Microsoft Graph Quick Start Guide
Source: https://learn.microsoft.com/en-us/graph/permissions-overview
A step-by-step guide to get you started quickly with Microsoft Graph. This typically involves setting up a basic application and making your first API call.
```text
Quick start
```
--------------------------------
### Install Core MGT Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the core Microsoft Graph Toolkit package, which includes all preceding packages and re-exports them for convenient installation and usage.
```bash
npm install @microsoft/mgt
```
--------------------------------
### Microsoft Graph Quick Start
Source: https://learn.microsoft.com/en-us/graph/api/appmanagementpolicy-delete-appliesto_view=graph-rest-beta
A guide to help developers get started quickly with Microsoft Graph, covering essential steps for setting up and making their first API calls.
```General
Quick start
```
--------------------------------
### Microsoft Graph Quick Start
Source: https://learn.microsoft.com/en-us/graph/integration-patterns-overview_source=recommendations
A quick start guide to begin using Microsoft Graph, providing essential steps for initial setup and basic operations.
```text
Quick start
```
--------------------------------
### Quick Start with Microsoft Graph
Source: https://learn.microsoft.com/en-us/graph/api/resources/classificationinnererror_view=graph-rest-1
A quick start guide to help developers begin using the Microsoft Graph API, covering initial setup and basic operations.
```General
Quick start
```
--------------------------------
### Install Proxy Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the Proxy provider package, which includes the ProxyProvider for applications that proxy Graph calls through a backend service.
```bash
npm install @microsoft/mgt-proxy-provider
```
--------------------------------
### Install Proxy Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the Proxy provider package, which includes the ProxyProvider for applications that proxy Graph calls through a backend service.
```bash
npm install @microsoft/mgt-proxy-provider
```
--------------------------------
### Install Proxy Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the Proxy provider package, which includes the ProxyProvider for applications that proxy Graph calls through a backend service.
```bash
npm install @microsoft/mgt-proxy-provider
```
--------------------------------
### Microsoft Graph Quick Start
Source: https://learn.microsoft.com/en-us/graph/integration-patterns-overview
A quick start guide to begin using Microsoft Graph, providing essential steps for initial setup and basic operations.
```text
Quick start
```
--------------------------------
### Install SharePoint Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the SharePoint provider package, which contains the SharePointProvider for authenticating within a SharePoint environment.
```bash
npm install @microsoft/mgt-sharepoint-provider
```
--------------------------------
### Install SharePoint Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the SharePoint provider package, which contains the SharePointProvider for authenticating within a SharePoint environment.
```bash
npm install @microsoft/mgt-sharepoint-provider
```
--------------------------------
### Install SharePoint Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the SharePoint provider package, which contains the SharePointProvider for authenticating within a SharePoint environment.
```bash
npm install @microsoft/mgt-sharepoint-provider
```
--------------------------------
### Get Mobile App Install Summary Example (HTTP)
Source: https://learn.microsoft.com/en-us/graph/api/intune-apps-mobileappinstallsummary-get_view=graph-rest-beta
An example of a complete HTTP GET request to the Microsoft Graph API to fetch the install summary for a mobile app, including the base URL and endpoint.
```HTTP
GET https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}/installSummary
```
--------------------------------
### Use Microsoft Graph Toolkit via CDN (HTML)
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Includes the Microsoft Graph Toolkit using a CDN link. This method is a quick way to get started without installing npm packages, suitable for simple projects or quick testing.
```html
```
--------------------------------
### Use Microsoft Graph Toolkit via CDN (HTML)
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Includes the Microsoft Graph Toolkit using a CDN link. This method is a quick way to get started without installing npm packages, suitable for simple projects or quick testing.
```html
```
--------------------------------
### Microsoft Graph API - Quick Start
Source: https://learn.microsoft.com/en-us/graph/api/resources/intune-apps-win32lobappinstallexperience_view=graph-rest-1
Guides users through the initial steps required to start using the Microsoft Graph API. This typically includes setting up an application, obtaining authentication tokens, and making the first API call.
```N/A
Quick start
```
--------------------------------
### Get installed app response - HTTP
Source: https://learn.microsoft.com/en-us/graph/api/userteamwork-get-installedapps_view=graph-rest-1
This snippet shows an example HTTP response when retrieving an installed application for a user.
```http
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "YTZiNjMzNjUtMzFhNC00ZjQzLTkyZWMtNzEwYjcxNTU3YWY5IyMwLjk"
}
]
}
```
--------------------------------
### Use Microsoft Graph Toolkit via CDN (HTML)
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Includes the Microsoft Graph Toolkit using a CDN link. This method is a quick way to get started without installing npm packages, suitable for simple projects or quick testing.
```html
```
--------------------------------
### Get Team Installed App with Definition (C#)
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps_view=graph-rest-1
C# example to get an installed app in a team, expanding the `teamsAppDefinition`. Requires the Microsoft Graph SDK for .NET.
```csharp
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teams["{team-id}"].InstalledApps["{teamsAppInstallation-id}"].GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string []{ "teamsAppDefinition" };
});
```
--------------------------------
### Microsoft Graph Overview and Quick Start
Source: https://learn.microsoft.com/en-us/graph/api/resources/accesspackageanswerchoice_view=graph-rest-beta
This section provides an overview of Microsoft Graph, its latest updates, and a quick start guide to help you begin using the API. It covers essential concepts for getting started with Microsoft Graph development.
```text
Overview of Microsoft Graph
What's new
API changelog
Quick start
```
--------------------------------
### Get installed app in chat (Java)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for Java. Requires initializing the GraphServiceClient.
```Java
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppInstallation result = graphClient.chats().byChatId("{chat-id}").installedApps().byTeamsAppInstallationId("{teamsAppInstallation-id}").get();
```
--------------------------------
### Install MGT Chat Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the Microsoft Graph Toolkit Chat package, which includes all chat React components and depends on the `@microsoft/mgt-react` package.
```bash
npm install @microsoft/mgt-chat
```
--------------------------------
### Use Microsoft Graph Toolkit via CDN (HTML)
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview
Includes the Microsoft Graph Toolkit using a CDN link. This method is a quick way to get started without installing npm packages, suitable for simple projects or quick testing.
```html
```
--------------------------------
### Get installed app in chat (C#)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for C#. Ensure you have initialized the graphClient.
```C#
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Chats["{chat-id}"].InstalledApps["{teamsAppInstallation-id}"].GetAsync();
```
--------------------------------
### Install MGT Chat Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the Microsoft Graph Toolkit Chat package, which includes all chat React components and depends on the `@microsoft/mgt-react` package.
```bash
npm install @microsoft/mgt-chat
```
--------------------------------
### Microsoft Graph Toolkit To Do Component Quick Start
Source: https://learn.microsoft.com/en-us/graph/toolkit/components/todo_tabs=html
This section provides a quick start guide for integrating the To Do component from the Microsoft Graph Toolkit into your application. It outlines the necessary steps and configurations to get the component up and running.
```html
```
```javascript
import { registerMgtComponent } from "@microsoft/mgt";
registerMgtComponent('mgt-todo', MgtTodo);
// Usage in HTML:
//
```
--------------------------------
### Microsoft Graph Overview and Quick Start
Source: https://learn.microsoft.com/en-us/graph/api/resources/accessPackageQuestion_view=graph-rest-beta
This section provides an overview of Microsoft Graph, its latest updates, and a quick start guide to help you begin using the API. It covers essential concepts for getting started with Microsoft Graph development.
```text
Overview of Microsoft Graph
What's new
API changelog
Quick start
```
--------------------------------
### Start Cloud PC - Go SDK
Source: https://learn.microsoft.com/en-us/graph/api/cloudpc-start_tabs=http&view=graph-rest-beta
This Go code snippet demonstrates starting a Cloud PC using the Microsoft Graph SDK. It includes necessary imports and client initialization guidance.
```Go
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Me().CloudPCs().ByCloudPCId("cloudPC-id").Start().Post(context.Background(), nil)
```
--------------------------------
### Get installed app in chat (Java)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for Java. Requires initializing the GraphServiceClient.
```Java
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppInstallation result = graphClient.chats().byChatId("{chat-id}").installedApps().byTeamsAppInstallationId("{teamsAppInstallation-id}").get();
```
--------------------------------
### Install MGT SPFx Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the Microsoft Graph Toolkit SharePoint Framework package, providing a library for using the toolkit within SharePoint Framework solutions.
```bash
npm install @microsoft/mgt-spfx
```
--------------------------------
### Get installed app in chat (C#)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for C#. Ensure you have initialized the graphClient.
```C#
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Chats["{chat-id}"].InstalledApps["{teamsAppInstallation-id}"].GetAsync();
```
--------------------------------
### Install MGT SPFx Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the Microsoft Graph Toolkit SharePoint Framework package, providing a library for using the toolkit within SharePoint Framework solutions.
```bash
npm install @microsoft/mgt-spfx
```
--------------------------------
### Install MGT SPFx Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the Microsoft Graph Toolkit SharePoint Framework package, providing a library for using the toolkit within SharePoint Framework solutions.
```bash
npm install @microsoft/mgt-spfx
```
--------------------------------
### Install MGT Chat Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the Microsoft Graph Toolkit Chat package, which includes all chat React components and depends on the `@microsoft/mgt-react` package.
```bash
npm install @microsoft/mgt-chat
```
--------------------------------
### Get Team Installed App with Definition (PHP)
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps_view=graph-rest-1
PHP example demonstrating how to get an installed app in a team and expand its definition using the Microsoft Graph SDK for PHP.
```php
expand = ["teamsAppDefinition"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->teams()->byTeamId('team-id')->installedApps()->byTeamsAppInstallationId('teamsAppInstallation-id')->get($requestConfiguration)->wait();
```
--------------------------------
### Get installed app in chat (Java)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_tabs=http&view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for Java. Requires initializing the GraphServiceClient.
```Java
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppInstallation result = graphClient.chats().byChatId("{chat-id}").installedApps().byTeamsAppInstallationId("{teamsAppInstallation-id}").get();
```
--------------------------------
### Get installed app in chat (C#)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_tabs=http&view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for C#. Ensure you have initialized the graphClient.
```C#
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Chats["{chat-id}"].InstalledApps["{teamsAppInstallation-id}"].GetAsync();
```
--------------------------------
### Start Cloud PC - Go SDK
Source: https://learn.microsoft.com/en-us/graph/api/cloudpc-start_view=graph-rest-beta
This Go code snippet demonstrates starting a Cloud PC using the Microsoft Graph SDK. It includes necessary imports and client initialization guidance.
```Go
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Me().CloudPCs().ByCloudPCId("cloudPC-id").Start().Post(context.Background(), nil)
```
--------------------------------
### Microsoft Graph Toolkit To Do Component Quick Start
Source: https://learn.microsoft.com/en-us/graph/toolkit/components/todo
This section provides a quick start guide for integrating the To Do component from the Microsoft Graph Toolkit into your application. It outlines the necessary steps and configurations to get the component up and running.
```html
```
```javascript
import { registerMgtComponent } from "@microsoft/mgt";
registerMgtComponent('mgt-todo', MgtTodo);
// Usage in HTML:
//
```
--------------------------------
### Get installed app in chat (PHP)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for PHP. Shows how to create a GraphServiceClient and make the request.
```PHP
chats()->byChatId('chat-id')->installedApps()->byTeamsAppInstallationId('teamsAppInstallation-id')->get()->wait();
```
--------------------------------
### Register All Components and MSAL2 Provider (HTML)
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
A shortcut to register all components from `@microsoft/mgt-components` along with the MSAL2 provider. This simplifies the setup when using multiple components.
```html
```
--------------------------------
### Get installed app in chat (Go)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for Go. This includes necessary imports and client initialization.
```Go
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Chats().ByChatId("chat-id").InstalledApps().ByTeamsAppInstallationId("teamsAppInstallation-id").Get(context.Background(), nil)
```
--------------------------------
### Get installed app in chat (PHP)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for PHP. Shows how to create a GraphServiceClient and make the request.
```PHP
chats()->byChatId('chat-id')->installedApps()->byTeamsAppInstallationId('teamsAppInstallation-id')->get()->wait();
```
--------------------------------
### Initiate Remote Assistance Partner Onboarding (Go)
Source: https://learn.microsoft.com/en-us/graph/api/intune-remoteassistance-remoteassistancepartner-beginonboarding_view=graph-rest-1
This Go code example shows how to onboard a remote assistance partner using the Microsoft Graph SDK. It includes necessary imports and demonstrates calling the BeginOnboarding method.
```go
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.DeviceManagement().RemoteAssistancePartners().ByRemoteAssistancePartnerId("remoteAssistancePartner-id").BeginOnboarding().Post(context.Background(), nil)
```
--------------------------------
### Get installed app in chat (Go)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for Go. This includes necessary imports and client initialization.
```Go
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Chats().ByChatId("chat-id").InstalledApps().ByTeamsAppInstallationId("teamsAppInstallation-id").Get(context.Background(), nil)
```
--------------------------------
### Get installed app in chat (JavaScript)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for JavaScript. Demonstrates client initialization and making the API call.
```JavaScript
const options = {
authProvider,
};
const client = Client.init(options);
let teamsAppInstallation = await client.api('/chats/19:d65713bc498c4a428c71ef9353e6ce20@thread.v2/installedApps/MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMwMDAwMTAxNi1kZTA1LTQ5MmUtOTEwNi00ODI4ZmM4YTg2ODc=')
.get();
```
--------------------------------
### Start Cloud PC - Go SDK
Source: https://learn.microsoft.com/en-us/graph/api/cloudpc-start_preserve-view=true&tabs=http&view=graph-rest-beta
This Go code snippet demonstrates starting a Cloud PC using the Microsoft Graph SDK. It includes necessary imports and client initialization guidance.
```Go
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Me().CloudPCs().ByCloudPCId("cloudPC-id").Start().Post(context.Background(), nil)
```
--------------------------------
### Install MGT React Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the Microsoft Graph Toolkit React package, which contains autogenerated React components and depends on the `@microsoft/mgt` package.
```bash
npm install @microsoft/mgt-react
```
--------------------------------
### Microsoft Graph API - Quick Start
Source: https://learn.microsoft.com/en-us/graph/api/resources/intune-shared-groupassignmenttarget_view=graph-rest-1
Guides users through the initial steps required to start using the Microsoft Graph API. This typically includes setting up an application, obtaining authentication tokens, and making the first API call.
```N/A
Quick start
```
--------------------------------
### Get installed app in chat (PHP)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_tabs=http&view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for PHP. Shows how to create a GraphServiceClient and make the request.
```PHP
chats()->byChatId('chat-id')->installedApps()->byTeamsAppInstallationId('teamsAppInstallation-id')->get()->wait();
```
--------------------------------
### Install MGT React Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the Microsoft Graph Toolkit React package, which contains autogenerated React components and depends on the `@microsoft/mgt` package.
```bash
npm install @microsoft/mgt-react
```
--------------------------------
### Get installed app in chat (Go)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_tabs=http&view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for Go. This includes necessary imports and client initialization.
```Go
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Chats().ByChatId("chat-id").InstalledApps().ByTeamsAppInstallationId("teamsAppInstallation-id").Get(context.Background(), nil)
```
--------------------------------
### Install MGT React Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the Microsoft Graph Toolkit React package, which contains autogenerated React components and depends on the `@microsoft/mgt` package.
```bash
npm install @microsoft/mgt-react
```
--------------------------------
### Install MGT SPFx Utils Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the Microsoft Graph Toolkit SharePoint Framework utilities package, which contains helper functions for lazy loading in SharePoint Framework solutions.
```bash
npm install @microsoft/mgt-spfx-utils
```
--------------------------------
### Get installed app in chat (JavaScript)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for JavaScript. Demonstrates client initialization and making the API call.
```JavaScript
const options = {
authProvider,
};
const client = Client.init(options);
let teamsAppInstallation = await client.api('/chats/19:d65713bc498c4a428c71ef9353e6ce20@thread.v2/installedApps/MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMwMDAwMTAxNi1kZTA1LTQ5MmUtOTEwNi00ODI4ZmM4YTg2ODc=')
.get();
```
--------------------------------
### Get installed app in chat (PowerShell)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_view=graph-rest-1
Example of how to retrieve an app installed in a specified chat using PowerShell. Requires the Microsoft.Graph.Teams module.
```PowerShell
Import-Module Microsoft.Graph.Teams
Get-MgChatInstalledApp -ChatId $chatId -TeamsAppInstallationId $teamsAppInstallationId
```
--------------------------------
### Quick Start with Microsoft Graph Security API
Source: https://learn.microsoft.com/en-us/graph/api/resources/security-api-overview_source=recommendations
A quick start guide to begin using the Microsoft Graph security API. It typically involves setting up authentication and making your first API call.
--------------------------------
### Install MGT SPFx Utils Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the Microsoft Graph Toolkit SharePoint Framework utilities package, which contains helper functions for lazy loading in SharePoint Framework solutions.
```bash
npm install @microsoft/mgt-spfx-utils
```
--------------------------------
### Get installed app in chat (PowerShell)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps
Example of how to retrieve an app installed in a specified chat using PowerShell. Requires the Microsoft.Graph.Teams module.
```PowerShell
Import-Module Microsoft.Graph.Teams
Get-MgChatInstalledApp -ChatId $chatId -TeamsAppInstallationId $teamsAppInstallationId
```
--------------------------------
### Install MGT SPFx Utils Package
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the Microsoft Graph Toolkit SharePoint Framework utilities package, which contains helper functions for lazy loading in SharePoint Framework solutions.
```bash
npm install @microsoft/mgt-spfx-utils
```
--------------------------------
### Start Cloud PC - Go SDK
Source: https://learn.microsoft.com/en-us/graph/api/cloudpc-start_view=graph-rest-1
This Go code example shows how to start a Cloud PC using the Microsoft Graph SDK for Go. It includes necessary imports and demonstrates calling the Start method with the Cloud PC ID.
```Go
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Me().CloudPCs().ByCloudPCId("cloudPC-id").Start().Post(context.Background(), nil)
```
--------------------------------
### Get installed app in chat (JavaScript)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_tabs=http&view=graph-rest-1
Example of how to get an app installed in a specified chat using the Microsoft Graph SDK for JavaScript. Demonstrates client initialization and making the API call.
```JavaScript
const options = {
authProvider,
};
const client = Client.init(options);
let teamsAppInstallation = await client.api('/chats/19:d65713bc498c4a428c71ef9353e6ce20@thread.v2/installedApps/MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMwMDAwMTAxNi1kZTA1LTQ5MmUtOTEwNi00ODI4ZmM4YTg2ODc=')
.get();
```
--------------------------------
### Get installed app in chat (PowerShell)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_tabs=http&view=graph-rest-1
Example of how to retrieve an app installed in a specified chat using PowerShell. Requires the Microsoft.Graph.Teams module.
```PowerShell
Import-Module Microsoft.Graph.Teams
Get-MgChatInstalledApp -ChatId $chatId -TeamsAppInstallationId $teamsAppInstallationId
```
--------------------------------
### Start Cloud PC - Go SDK
Source: https://learn.microsoft.com/en-us/graph/api/cloudpc-start_preserve-view=true&view=graph-rest-beta
This Go code snippet demonstrates starting a Cloud PC using the Microsoft Graph SDK. It includes necessary imports and client initialization guidance.
```Go
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Me().CloudPCs().ByCloudPCId("cloudPC-id").Start().Post(context.Background(), nil)
```
--------------------------------
### Get Installed Apps in Chat (Python)
Source: https://learn.microsoft.com/en-us/graph/api/chat-get-installedapps_view=graph-rest-beta
Fetches installed applications within a chat using the Microsoft Graph Python SDK (beta version). This example demonstrates how to select specific properties (`consentedPermissionSet`, `id`) for the installed applications and make a GET request.
```Python
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.chats.item.installed_apps.item.teams_app_installation_item_request_builder import TeamsAppInstallationItemRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = TeamsAppInstallationItemRequestBuilder.TeamsAppInstallationItemRequestBuilderGetQueryParameters(
select = ["consentedPermissionSet","id"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.chats.by_chat_id('chat-id').installed_apps.by_teams_app_installation_id('teamsAppInstallation-id').get(request_configuration = request_configuration)
```
--------------------------------
### Get Team Installed App with Definition (Python)
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps_view=graph-rest-1
Python example to fetch an installed app in a team and expand its `teamsAppDefinition`. This utilizes the Microsoft Graph SDK for Python.
```python
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.teams.item.installed_apps.item.teams_app_installation_item_request_builder import TeamsAppInstallationItemRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = TeamsAppInstallationItemRequestBuilder.TeamsAppInstallationItemRequestBuilderGetQueryParameters(
expand = ["teamsAppDefinition"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.teams.by_team_id('team-id').installed_apps.by_teams_app_installation_id('teamsAppInstallation-id').get(request_configuration = request_configuration)
```
--------------------------------
### Install Teams App for User - JavaScript
Source: https://learn.microsoft.com/en-us/graph/api/userteamwork-post-installedapps_source=recommendations
This JavaScript code example shows the initial setup for installing a Teams app for a user using the Microsoft Graph SDK for JavaScript. It includes client initialization.
```JavaScript
const options = {
authProvider,
};
const client = Client.init(options);
const userScopeTeamsAppInstallation = {
```
--------------------------------
### Install MSAL2 Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the MSAL2 provider package, which includes the Msal2Provider and the mgt-msal2-provider component for authenticating web apps and PWAs using MSAL-browser.
```bash
npm install @microsoft/mgt-msal2-provider
```
--------------------------------
### Get Team Installed App with Definition (JavaScript)
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps_view=graph-rest-1
JavaScript example to retrieve an installed app from a team, expanding the `teamsAppDefinition`. Uses the Microsoft Graph JavaScript SDK.
```javascript
const options = {
authProvider,
};
const client = Client.init(options);
let teamsAppInstallation = await client.api('/teams/{id}/installedApps/{id}')
.expand('teamsAppDefinition')
.get();
```
--------------------------------
### Install Microsoft Graph Toolkit npm packages
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
Installs the necessary Microsoft Graph Toolkit packages for using ES6 modules in your project. This includes the core element, components, and the MSAL2 provider.
```bash
npm install @microsoft/mgt-element @microsoft/mgt-components @microsoft/mgt-msal2-provider
```
--------------------------------
### Register All Components and MSAL2 Provider (HTML)
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
A shortcut to register all components from `@microsoft/mgt-components` along with the MSAL2 provider. This simplifies the setup when using multiple components.
```html
```
--------------------------------
### Get Team Installed App with Definition (Java)
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps_view=graph-rest-1
Java example to fetch an installed app in a team, including its definition. This requires the Microsoft Graph SDK for Java.
```java
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppInstallation result = graphClient.teams().byTeamId("{team-id}").installedApps().byTeamsAppInstallationId("{teamsAppInstallation-id}").get(requestConfiguration -> {
requestConfiguration.queryParameters.expand = new String []{"teamsAppDefinition"};
});
```
--------------------------------
### Install Microsoft Graph Toolkit npm packages
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the necessary Microsoft Graph Toolkit packages for using ES6 modules in your project. This includes the core element, components, and the MSAL2 provider.
```bash
npm install @microsoft/mgt-element @microsoft/mgt-components @microsoft/mgt-msal2-provider
```
--------------------------------
### Get Team Installed App with Definition (Go)
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps_view=graph-rest-1
Go example to retrieve an installed app in a team, expanding the `teamsAppDefinition`. This uses the Microsoft Graph SDK for Go.
```go
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphteams "github.com/microsoftgraph/msgraph-sdk-go/teams"
//other-imports
)
requestParameters := &graphteams.ItemInstalledAppsItemRequestBuilderGetQueryParameters{
Expand: [] string {"teamsAppDefinition"},
}
configuration := &graphteams.ItemInstalledAppsItemRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Teams().ByTeamId("team-id").InstalledApps().ByTeamsAppInstallationId("teamsAppInstallation-id").Get(context.Background(), configuration)
```
--------------------------------
### Start Cloud PC - JavaScript SDK
Source: https://learn.microsoft.com/en-us/graph/api/cloudpc-start_view=graph-rest-1
This JavaScript example demonstrates starting a Cloud PC using the Microsoft Graph SDK. It covers initializing the client and making the API call to the beta endpoint.
```JavaScript
const options = {
authProvider,
};
const client = Client.init(options);
await client.api('/me/cloudPCs/36bd4942-0ca8-11ed-861d-0242ac120002/start')
.version('beta')
.post();
```
--------------------------------
### Get Installed Apps for a User (JavaScript)
Source: https://learn.microsoft.com/en-us/graph/api/userteamwork-list-installedapps_view=graph-rest-1
This JavaScript example shows how to use the Microsoft Graph SDK to get installed applications for a user. It includes client initialization with an auth provider.
```javascript
const options = {
authProvider,
};
const client = Client.init(options);
let installedApps = await client.api('/users/5b649834-7412-4cce-9e69-176e95a394f5/teamwork/installedApps')
.get();
```
--------------------------------
### Get Installed Apps for a User (JavaScript)
Source: https://learn.microsoft.com/en-us/graph/api/userteamwork-list-installedapps
This JavaScript example shows how to use the Microsoft Graph SDK to get installed applications for a user. It includes client initialization with an auth provider.
```javascript
const options = {
authProvider,
};
const client = Client.init(options);
let installedApps = await client.api('/users/5b649834-7412-4cce-9e69-176e95a394f5/teamwork/installedApps')
.get();
```
--------------------------------
### Install MSAL2 Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations&tabs=package
Installs the MSAL2 provider package, which includes the Msal2Provider and the mgt-msal2-provider component for authenticating web apps and PWAs using MSAL-browser.
```bash
npm install @microsoft/mgt-msal2-provider
```
--------------------------------
### Install Microsoft Graph Toolkit npm packages
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the necessary Microsoft Graph Toolkit packages for using ES6 modules in your project. This includes the core element, components, and the MSAL2 provider.
```bash
npm install @microsoft/mgt-element @microsoft/mgt-components @microsoft/mgt-msal2-provider
```
--------------------------------
### Quick Start with Microsoft Graph Security API
Source: https://learn.microsoft.com/en-us/graph/api/resources/security-api-overview
A quick start guide to begin using the Microsoft Graph security API. It typically involves setting up authentication and making your first API call.
--------------------------------
### HTTP Response for Get installedApps
Source: https://learn.microsoft.com/en-us/graph/api/userteamwork-get-installedapps
Example of a successful HTTP response (200 OK) when retrieving installed app information. The response is in JSON format and includes the ID of the installed app.
```HTTP
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "YTZiNjMzNjUtMzFhNC00ZjQzLTkyZWMtNzEwYjcxNTU3YWY5IyMwLjk"
}
]
}
```
--------------------------------
### Get tenantTag - C# Example
Source: https://learn.microsoft.com/en-us/graph/api/managedtenants-tenanttag-get_view=graph-rest-beta
Example of how to retrieve a tenantTag using the Microsoft Graph SDK for C#. This requires authentication and the appropriate SDK setup.
```C#
// Requires Microsoft.Graph SDK
var tenantTag = await graphClient.ManagedTenants.TenantTags["{tenantTag-id}"].GetAsync();
```
--------------------------------
### Install MSAL2 Provider
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_tabs=package
Installs the MSAL2 provider package, which includes the Msal2Provider and the mgt-msal2-provider component for authenticating web apps and PWAs using MSAL-browser.
```bash
npm install @microsoft/mgt-msal2-provider
```
--------------------------------
### Register All Components and MSAL2 Provider (HTML)
Source: https://learn.microsoft.com/en-us/graph/toolkit/get-started/overview_source=recommendations
A shortcut to register all components from `@microsoft/mgt-components` along with the MSAL2 provider. This simplifies the setup when using multiple components.
```html
```
--------------------------------
### HTTP Response for Get installedApps
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps_view=graph-rest-1
Example of a successful HTTP response (200 OK) when retrieving installed applications from a Microsoft Teams team. The response includes the ID of the installed app.
```http
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "id-value"
}
]
}
```
--------------------------------
### HTTP Response for Get installedApps
Source: https://learn.microsoft.com/en-us/graph/api/team-get-installedapps
Example of a successful HTTP response (200 OK) when retrieving installed applications from a Microsoft Teams team. The response includes the ID of the installed app.
```http
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "id-value"
}
]
}
```
--------------------------------
### Install Teams App for User - JavaScript
Source: https://learn.microsoft.com/en-us/graph/api/userteamwork-post-installedapps_view=graph-rest-1
This JavaScript code example shows the initial setup for installing a Teams app for a user using the Microsoft Graph SDK for JavaScript. It includes client initialization.
```JavaScript
const options = {
authProvider,
};
const client = Client.init(options);
const userScopeTeamsAppInstallation = {
```