Managing service principals in Cost Analyzer
  • 05 Aug 2026
  • 6 Minutes to read
  • Dark
    Light
  • Download PDF

Managing service principals in Cost Analyzer

  • Dark
    Light
  • Download PDF

Article summary

Overview

A Service principal is an application within Microsoft Entra ID that Turbo360 uses to connect to your Azure environment and access Azure resources on your behalf. Turbo360 uses the authentication tokens of the Service principal, scoped to the permissions you assign, to import cost data and power the features in Cost Analyzer.

0.png

This article covers how to add, update, remove, and automate the scope of a Service principal in Cost Analyzer.

Business value

Managing your Service principal directly from Turbo360 lets you control exactly which Azure subscriptions and cost management groups Turbo360 can access, keep client secrets current without service interruption, and automatically extend access as your Azure environment grows — reducing manual re-configuration and the risk of import failures caused by expired credentials.

Prerequisites

  • An Azure Service principal (App registration in Microsoft Entra ID) with at least Reader access at the subscription level. See What is a service principal? for how to create one.
  • The Service principal's Microsoft Entra ID (tenant) ID, Client ID, and Client secret.

Azure

Required permissions

Azure RBAC permissionAllows you to useNotes
Reader (minimum)Import cost data, Analysis, Monitoring (budget planner, anomaly detection), Reports, Optimization (basic and advanced rightsizing, other recommendations)Applied at subscription or management group level
Reservation Reader (recommended)View existing reservations, advanced recommendations, reservation expiry and usage monitoring, reservations in the Potential Savings and executive summary reportsApplied via role assignment in the Reservations area — not a subscription-based permission
Savings Plan Reader (recommended)View existing savings plans, monitor expiry and utilizationApplied via role assignment in the Savings Plans area — not a subscription-based permission

Additional, feature-specific permissions (for example, resource-level Contributor roles for Advanced Rightsizing or Scheduler actions) are documented in Permissions for service principal.

Turbo360

In addition, accessing Service principals in Turbo360's Cost Analyzer requires one of the following roles: Account owner, Owner, or Contributor.

RoleAdd a Service principalEdit a Service principalDelete a Service principal
Account owner
Owner
Contributor
Other roles

How it works

  • Turbo360 uses the Service principal's authentication tokens to manage the Azure resources it has been granted access to — it never accesses resources outside the assigned scope.
  • Client secrets have an expiration date. Turbo360 lets you configure the same expiry date as the Azure portal and notifies you 7 days before expiry so you can rotate the secret before access is interrupted.
  • You can update the client secret and its expiration date at any time from Service principal management, without needing to remove and re-add the Service principal.
  • Scope automation rules let Turbo360 automatically assign newly added subscriptions to the correct cost management groups, based on subscription name, instead of requiring manual assignment each time.

Steps

Use the following steps to add, update, configure scope automation for, and remove a Service principal. Navigate to Cost Analyzer > Service Principal to get started.

Add a Service principal

Adding a Service principal connects an Azure environment to Cost Analyzer and defines which subscriptions and cost management groups it can access.

  1. Go to the Service principals section and click Add.

  2. Select an existing Service principal or choose to add a new one.

  3. Enter the required details: Microsoft Entra ID, Client ID, and Client secret expiration date.

  4. Click Validate.

  5. After successful validation, click Next.

    1.png

  6. Configure access to cost management groups:

    • Select a subscription from the left panel to assign a cost management group.
    • To update multiple subscriptions at once, select them together.
    • Use Copy from Subscription to apply a subscription's access policy to multiple subscriptions.

    SP configuration.png

    Copy group assignment.png

  7. Scope can be applied for selected subscriptions using the Filters option available next to it (for example, resource types, tags). Click Save to apply the scope to the subscription.

    Scope selection.png

  8. Click Add. In the Add Confirmation dialog, optionally select Add newly mapped subscriptions to existing Views, Widgets, and Monitors, only if all existing subscriptions are selected. When enabled, new subscriptions are automatically included wherever the Select All option is currently selected in the subscription filtering.

  9. Click Confirm to complete the setup.

    Add confirmation.png

Update a Service principal

Editing a Service principal lets you rotate the client secret and its expiration date, add new subscriptions, modify the scope of existing subscriptions, and manage access policies and scope-based automation rules.

  1. Go to the Service principals section and click Edit on the Service principal you want to update.

  2. Update the Client secret, expiration date, subscriptions, or scope as needed.

  3. In the confirmation dialog, optionally select Add newly mapped subscriptions to existing Views, Widgets, and Monitors only when all subscriptions are selected. When enabled, newly added subscriptions are automatically included in existing Views, Widgets, and Monitors wherever Select All is currently selected in the subscription filtering.

    Edit sp.png

    Update sp.png

Remove a Service principal

  1. Click the Delete icon next to the required Service principal in the Service principals section, and confirm the deletion to remove it from the Cost Analyzer module.

    8.png

The removed Service principal remains available in the global Service principals section and can be added back later.

Global Sp section.png

Configure scope automation

Scope automation applies cost management group scopes automatically, based on subscription name, so newly granted subscriptions are added to the correct cost management groups without manual assignment.

  1. Go to the Service principals section and Add or Edit a Service principal to configure automation rules.

  2. Validate the credentials and proceed to the next step.

  3. Enable Auto-assign new subscriptions to groups to automatically grant root-level access to newly added subscriptions when no rules are defined.

    Auto-assign toggle.png

  4. Click Configure rules to define rules that automatically assign matching subscriptions to specific cost management groups. Subscriptions that meet the defined criteria are granted access to the configured scopes.

    Auto-assign rules.png

  5. Click Save to apply the automation rules.

  6. Click Update to finish setting up the automation rules.

Configuration

OptionTypeDefaultRequiredDescription
Client secret expiration dateDateMatches Azure portal expiryYesSets when Turbo360 expects the client secret to expire. Turbo360 sends a notification 7 days before this date so the secret can be rotated in time.
Auto-assign new subscriptions to groupsToggleOffNoWhen enabled with no rules defined, grants root-level access to newly added subscriptions automatically.
Configure rules (scope automation)Rule setNoneNoAutomatically assigns matching subscriptions to specific cost management groups based on subscription name.

Troubleshooting

  1. Validation fails when adding a Service principal
    Cause: The Microsoft Entra ID, Client ID, or Client secret entered doesn't match an active app registration, or the client secret has expired in Azure.
    Fix: Confirm the values against the app registration in Microsoft Entra ID, and generate a new client secret if it has expired, then retry Validate.

  2. Cost data doesn't appear after adding a Service principal
    Cause: The Service principal doesn't have Reader access at the subscription level in Azure.
    Fix: Assign the Reader role to the Service principal at the subscription (or management group) level in Azure, then re-import.

  3. "Add" or "Edit" option is unavailable for a Service principal
    Cause: The signed-in Turbo360 user doesn't have the Account Owner, Owner, or Contributor role.
    Fix: Ask a Turbo360 Account Owner or Owner to grant one of these roles, or to perform the action on your behalf.


Was this article helpful?