I'm executing the code below, and it appears that the delete method isn't able to detect all the service principals like the list method does. Has anyone else encountered this problem?
Azure Service Principals are not deleting from the Azure CLI
74 Views Asked by kevin At
1
There are 1 best solutions below
Related Questions in AZURE
- How to update to the latest external Git in Azure Web App?
- I need an azure product that executes my intensive ffmpeg command then dies, and i only get charged for the delta. Any Tips?
- Inject AsyncCollector into a service
- mutual tls authentication between app service and function app
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Application settings for production deployment slot in Azure App Services
- Encountered an error (ServiceUnavailable) from host runtime on Azure Function App
- Implementing Incremental consent when using both application and delegated permissions
- Invalid format for email address in WordPress on Azure app service
- Producer Batching Service Bus Vs Kafka
- Integrating Angular External IP with ClusterIP of .NET microservices on AKS
- Difficulty creating a data pipeline with Fabric Datafactory using REST
- Azure Batch for Excel VBA
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- Azure Scale Sets and Parallel Jobs
Related Questions in AZURE-CLI
- Kubernetes : How to connect production and non-production Azure CLI simultaneously through windows system?
- Azure Developer CLI does not recognize environment
- Is there any way to get a new Azure CLI token without logging out?
- Azure Service Principals are not deleting from the Azure CLI
- az functionapp config is truncating trailing bracket
- How to install azure devops extension from powershell script
- Troubleshooting GitHub Secrets: "Invalid Subscription or Tenant Level Error"
- "Directory is expected, not a file." error when using Azure CLI to download from blob storage
- Azure error writing parquet to ADLS Gen 2
- Azure container registry az acr build command times out with 404 BlobNotFound
- Error Exporting disk to a Storage account -Both configured with private endpoints in the same Vnet
- How to create Azure devops service connection via code?
- What Azure account to use to run a python script on multiple azure tenants resources?
- How to add all iterations of a project to all teams in that project?
- Is it possible to show if OAuth is being used for Azure Function App?
Related Questions in AZURE-SERVICE-PRINCIPAL
- Create service principle before creating the resource
- Azure AD: Grant an appRoleAssignment for a service principal is failing with "code": "Request_ResourceNotFound"
- Azure service principal: Grant an appRoleAssignment for a service principal does update the original permission's status
- Obtain OAuth token using Service Connection
- Insufficient privileges to complete the operation with listing service principals using az ad sp list
- Multitenant API - Admin consent ERROR https://login.microsoftonline.com/organizations/v2.0/adminconsent AADSTS90009
- Service principle assign to who? ACR or App service?
- Access service principal for Microsoft.Azure.WebSites Resource Provider (Microsoft Azure App Service) from Azure pipeline task
- Assign the claimsMappingPolicy to a servicePrincipal giving error?
- How to refresh access token provided by TokenCredential / ClientSecretCredential by Azure Identity Java SDK?
- az cli command to create service principal doesn't create certificate in keyvault
- Keyvault permission error to store Service principal secrets
- How to add an API permission to an enterprise application (service principal) in the secondary tenant of a multi-tenant application?
- Azure AD App Registration fail to create Service Principals when creating using another Service Principal via az cli
- How to get Databricks Account ID without logging in to Account console?
Related Questions in ENTRA
- Local DX for service-to-service authentication based on Managed Identities in Azure
- Service Principals I create are not being created as mine
- Azure Service Principals are not deleting from the Azure CLI
- Entra multitenant collaboration
- Entra Proxy Service - Switching From IWA to Azure Authentication
- Extract logged in user's email from B2C tenant
- Entra ID Self Service Signup Application Claim Blade missing in B2X
- Entra External ID AttributeCollectionSubmit does not include ObjectId
- JWT Roles Are Missing From Token
- Unique SAML issuer required for each application within the same EntraID account
- Rule Syntax for Azure user.memberof
- Powershell Script to filter new Entra AD users
- Entra ID and SCIM: Setting up enum attribute for request to API
- Azure Automation Account - Connect-MGGraph - Insufficient priveleges
- How can I initialize GraphServiceClient by providing an acessToken using Microsoft.Graph v5 sdk
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

The
az ad sp listby default lists only the first 100 Service Principals. Hence you need to use--allflag to list all the Service Principals.Hence to resolve the error, you need to modify the script by using
az ad sp list --all --query "[].appId" -o tsvlike below:For sample, I tried to delete few Service Principals by using
-allflag (as I cannot delete all Service Principals in my environment):I tried to delete the below applications:
The service principals got deleted successfully: