7,023 questions
Using App credential can't create service principal using Azure Java SDK
James
0
Reputation points
Hi Team,
I am having problem using azure java sdk to create service principal,
val resourceManager: AzureResourceManager = { AzureResourceManager.authenticate(credential, profile).withDefaultSubscription()
}
val password = "xxxxx"
val sp = resourceManager
.accessManagement()
.servicePrincipals()
.define(spName)
.withExistingApplication(appId)
.definePasswordCredential(password)
.attach()
.create()
Got exception
{"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation.","innerError":{"date":"2024-12-19T19:50:01","request-id":"xxxx","client-request-id":"xxxx"}}}
I have already grant the service principal with role: "Role Based Access Control Administrator"
What permission should a service principal be configured before it can be used to generate another service principal? Thanks a million for the help!
Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Sign in to answer