How to add a credential to an existing service principal using Azure PowerShell
Written by Titus Manohar, IT security team, ManageEngine Updated on November 2025
Cmdlet Description:
The cmdlet allows you to add a new credential to an existing service principal by specifying the object ID or service principal name.
PowerShell Syntax:
Example: Add a password credential to an existing service principal
| Secret | : System.Security.SecureString |
| StartDate | : 10/10/2015 8:56:01 PM |
| EndDate | : 11/11/2016 8:26:03 PM |
| KeyId | : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Type | : Password |
Description: A new credential called "password" is added to a service principal name thathas its objectID specified.
About ADAudit Plus
ADAudit Plus is a real-time, web-based Windows Active Directory change reporting software that audits, tracks, reports and alerts onActive Directory, member servers, file servers, , NetApp filers EMC servers, and workstation events to help meet the demands of the much-needed security, audit and compliance.
With ADAudit Plus' 200+ detailed reports and instant alerts, track authorized and unauthorized group, GPO, computer, OU, and AD management changes, file/ folder modifications, access and permissions changes.. You can also export the reports to XLS, HTML, PDF and CSV formats to assist in further analysis and forensics. For more information on ADAudit Plus, visit https://www.manageengine.com/active-directory-audit/.
Explore Active Directory auditing and reporting with ADAudit Plus.
- Related Products
- ADManager Plus Active Directory Management & Reporting
- ADAudit Plus Real-time Active Directory Auditing and UBA
- EventLog Analyzer Real-time Log Analysis & Reporting
- ADSelfService Plus Self-Service Password Management
- AD360 Integrated Identity & Access Management
- Log360 (On-Premise | Cloud) Comprehensive SIEM and UEBA
- AD Free Tools Active Directory FREE Tools
