Is it possible to create a Redirect URI via an API call instead of using the Azure portal? Trying to automate.

Skylar Scaling 21 Reputation points
2021-07-14T18:30:21.86+00:00

I am trying to figure out if it is possible to create a Redirect URI in Azure WITHOUT going through the Azure portal? I understand how to add a Redirect URI for doing AD authentication for my application, but I would like to automate the creation of this URI for creation of new cluster/application instances. Is this possible? I can't find any documentation for performing this via an API call.

Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
672 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,913 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,569 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marilee Turscak-MSFT 34,121 Reputation points Microsoft Employee
    2021-07-14T21:15:43.927+00:00

    Hi @Skylar Scaling ,

    You can use Graph API to create the application and then use Get Application and Update Application. You can specify the type (web, spa, etc) and add the redirectUri(s).

    "web": {
    "redirectUris": [],
    "homePageUrl": null,
    "logoutUrl": null,
    "implicitGrantSettings": {
    "enableIdTokenIssuance": false,
    "enableAccessTokenIssuance": false
    }
    `
    Full example here >

    You can also make a PATCH request to add the Redirect URIs and specify their types as described here.

    Sources:

    https://learn.microsoft.com/en-us/graph/api/application-post-applications?view=graph-rest-beta&tabs=http

    https://stackoverflow.com/questions/58685870/how-to-specify-replyurlswithtype-programmatically

    https://learn.microsoft.com/en-us/graph/api/resources/webapplication?view=graph-rest-1.0

    https://learn.microsoft.com/en-us/graph/use-the-api

    https://stackoverflow.com/questions/31684821/how-to-add-application-to-azure-ad-programmatically

    -

    If this answer was helpful to you, please remember to "mark as answer" so that others in the community with similar questions can more easily find a solution.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful