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.
3,568 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Abiola Akinbade 29,645 Reputation points Volunteer Moderator
    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.