Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Remove key and certificate credentials on a service principal

> **Note**: Minimum Bicep version required to deploy this quickstart template is [v0.32.4](https://github.com/Azure/bicep/releases/tag/v0.32.4).

This template allows you to remove credentials on a service principal.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a bit more context in the README? Maybe describing the scenario with more details, like when would someone want to remove credentials on a service principal, what does it mean to remove them, how should service principals authenticate themselves, etc

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed via recent commits.


You can deploy the template with the following Azure CLI command (replace `<resource-group>` and `<app-id-of-service-principal>` with the necessary values for your deployment):

```sh
az deployment group create --resource-group <resource-group> --template-file main.bicep --parameters applicationId=<app-id-of-service-principal>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"experimentalFeaturesEnabled": {
"extensibility": true
},
// specify an alias for the version of the v1.0 dynamic types package you want to use
"extensions": {
"microsoftGraphV1": "br:mcr.microsoft.com/bicep/extensions/microsoftgraph/v1.0:0.2.0-preview"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extension microsoftGraphV1

@description('Application Id of the service principal')
param applicationId string

resource removeSPCreds 'Microsoft.Graph/servicePrincipals@v1.0' = {
appId: applicationId
keyCredentials: []
passwordCredentials: []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#",
"type": "QuickStart",
"itemDisplayName": "Remove key and certificate credentials on a service principal",
"description": "This template removes credentials (password and certificates) on a service principal",
"summary": "This template removes credentials (password and certificates) on a service principal",
Comment thread
linkhp marked this conversation as resolved.
Outdated
"githubUsername": "linkhp",
"docOwner": "dkershaw10",
"dateUpdated": "2025-05-06",
"validationType": "Manual",
"languages": ["bicep"]
}
Loading