Change Azure Active Directory “Reply URL” via Powershell command


To automate our build process, i was looking for a possibility to change the “Reply URL” of an existing Active Directory application via a Powershell script.

The official documentation just describes a way, how to change it with help of the web portal.

There is already a Github issue about this topic. But maybe someone faced a similar problem in the past and solved it?


As an alternative, you can put the following script in a console application and then call this program from your Powershell script.

First of all, include the nuget package Microsoft.Azure.ActiveDirectory.GraphClient.

A bit more details about the things you will need to change:

  • YourTenantId, this is the GUID that’s used to identify your azure active directory (AAD).
  •, basicly this is the name of your AAD followed by “”.
  • ClientIdForThisApplication, you will have to add the above console application in your AAD under applications manually. (as a Native Client Application). In the Configure tab, you will find the Client ID for this application. This only needs to be done once, you can keep using this application (and its Client Id) for all your builds.
  • NameOfYourApplication, name of the application you wish to change, as it is known in your AAD.
  • http://YourNewReplyUrl/, your new reply url.

(Small disclosure, I’ve scrapped the above code together from my existing code, I think I’ve copied all what’s required, but I haven’t tested the above result.)


Change Azure Active Directory “Reply URL” via Powershell command by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply