How to get Azure Service principal id for App registered in Azure and to verify roles added to that by using MSAL Library Java.
How to get Azure Service principal id for App registered in Azure and to verify roles added to that by using MSAL Library Java.
You can generate service principal
ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(client,
tenant,
key,
AzureEnvironment.AZURE);
Azure.Authenticated azureAuthClient = Azure.configure().authenticate(credentials);
String clusterId = "xxxxxxx";
ServicePrincipal servicePrincipal =
azureAuthClient.servicePrincipals()
.define(clusterId)
.withNewApplication("http://easycreate.azure.com/" + clusterId)
.definePasswordCredential("sppass")
.withPasswordValue("StrongPass!12")
.attach()
.create();