Tutorial: Connecting Python to Insights
This guide helps you get started using Python with Insights. It uses the Azure Kusto Python SDK. After connecting, you can query your game data with Python and use the library from Jupyter Notebooks. To learn more about other tools you can connect with Insights, see Connecting external tools to Insights.PlayFab Insights Management was retired on 3/31/2026. We recommend using Azure Data Explorer (ADX) Connections to manage your performance and cost going forward. If your title is still using Insights, continue to see this article for implementation details. For more information, see PlayFab Digest: March feature updates.
Prerequisites
PlayFab account authenticated with Azure AD
You need a PlayFab account or user for which the authentication provider is set to Microsoft. The Microsoft authentication provider uses Azure Active Directory (Azure AD) for authentication which is required to use the Azure services. See Azure Active Directory Authentication for Game Manager for instructions on creating an Azure AD-authenticated account or user. To verify that the account, or user, is set to use the Microsoft authentication provider:- Visit the PlayFab log in page.
- Select Sign in with Microsoft to access your PlayFab account.
Game Manager permissions for Insights
You need to assign your account a user role with the following Game Manager permissions enabled:- Admin status.
- Access to the Explorer tab and associated data.
- Read and write access to Analytics data.
Other prerequisites
Install Python packages
- Install the following python packages using pip:
- azure-kusto-data
- azure-kusto-ingest
- adal
- Below is an example script to get started with.
Additional resources
- Azure Kusto Python SDK documentation
- To learn about other tools to connect to Insights, see Connecting external tools to Insights
