---
title: "PATCH /{tenantID}/servicePrincipals/{objectId}"
method: PATCH
path: "/{tenantID}/servicePrincipals/{objectId}"
tags: ["ServicePrincipal"]
---

# PATCH /{tenantID}/servicePrincipals/{objectId}

`PATCH /{tenantID}/servicePrincipals/{objectId}`

Updates a service principal in the directory.

## Path parameters

- `objectId` string, required
- `tenantID` string, required

## Query parameters

- `api-version` string, required

## Request body

- ServicePrincipalUpdateParameters — Active Directory service principal common properties shared among GET, POST and PATCH
  - `accountEnabled` boolean — whether or not the service principal account is enabled
  - `appRoleAssignmentRequired` boolean — Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will issue a user or access token to the application.
  - `keyCredentials` KeyCredential[] — The collection of key credentials associated with the service principal.
    - `startDate` string, date-time — Start date.
    - `endDate` string, date-time — End date.
    - `value` string — Key value.
    - `keyId` string — Key ID.
    - `usage` string — Usage. Acceptable values are 'Verify' and 'Sign'.
    - `type` string — Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
    - `customKeyIdentifier` string — Custom Key Identifier
  - `passwordCredentials` PasswordCredential[] — The collection of password credentials associated with the service principal.
    - `startDate` string, date-time — Start date.
    - `endDate` string, date-time — End date.
    - `keyId` string — Key ID.
    - `value` string — Key value.
    - `customKeyIdentifier` string, byte — Custom Key Identifier
  - `servicePrincipalType` string — the type of the service principal
  - `tags` string[] — Optional list of tags that you can apply to your service principals. Not nullable.

## Response `204`

No Content

## Other responses

- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/graphrbacmanagementclient.md) · [All operations](https://skmtc.net/azure/apis/graphrbacmanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/graphrbacmanagementclient/revisions/71d95005600e/schema)
