Why am I receiving a Status 400 error when following instructions to add Enrollment Reader permission to a service principal?
search cancel

Why am I receiving a Status 400 error when following instructions to add Enrollment Reader permission to a service principal?

book

Article ID: 282796

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

You must identify and use the Enterprise application object ID where you granted the EA role.

If you use the Object ID from some other application, API calls will fail.  Verify that you’re using the correct Enterprise application object ID.

If you receive the following error when making your API call, then you may be incorrectly using the SPN object ID value located in App Registrations.  To resolve this error, ensure you're using the SPN object ID from Enterprise Applications, not App Registrations.

The provided principal Tenant Id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and principal Object Id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are not valid

 

Reference Doc: https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/assign-roles-azure-service-principals#troubleshoot