I am trying to create a service principle in using Microsoft graph API. Following the document i refereed create service principle. I just want to identify the service principle that created through graph API. So i just add display name in graph API body.Below is my service principle Json body.
$RESOURCE_GROUP = "TESTRG"
POST https://graph.microsoft.com/v1.0/servicePrincipals
Content-type: application/json
{
"appId": "65415bb1-9267-4313-bbf5-ae259732ee12",
"displayName": "' + $RESOURCE_GROUP + "-" + $appId + '",
}
it returns an error message
{ "error": { "code": "Request_BadRequest", "message": "Property displayName on the service principal does not match the application
| object.", "innerError": { "date": "2021-01-24T07:33:25", "request-id": "80792870-6524-4373-434342-434343",
| "client-request-id": "80792870-6524-4373-434342-434343" } } }
question from:https://stackoverflow.com/questions/65868183/how-to-set-the-service-principle-display-name-in-azure-active-directory