Trying to add a new secret password to Azure Registration using logic app using API but the value is empty

Eldi 0 Reputation points
2024-07-21T10:26:37.88+00:00

Hey,

I'm using logic app to add a secret password to service principal using HTTP call. i get status 200 and the secret value. but SPN not getting updated still see the old password despite the fact i'm getting 200 succeeded status.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,994 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,598 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. akinbade abiola 9,010 Reputation points
    2024-07-21T10:58:20.9733333+00:00

    Hello Eldi,

    Thanks for your question.

    I will recommend the following troubleshooting steps:

    Check the request body for details of properties. Also confirm you're using the correct principal ID

    For adding a password to a service principal, you should be using the Microsoft Graph API. It should have the general format:

    POST https://graph.microsoft.com/v1.0/servicePrincipals/{id}/addPassword

    See:

    https://learn.microsoft.com/en-us/graph/api/serviceprincipal-get?view=graph-rest-1.0&tabs=http

    https://learn.microsoft.com/en-us/graph/api/serviceprincipal-addpassword?view=graph-rest-1.0&tabs=http

    You can also check that the logic app has the sufficient permissions assigned.

    Do remember to 'Accept Answer' and 'Upvote' if the above information was useful

    Regards,

    Abiola

    0 comments No comments