Skip to content
Nick's IT Blog

Nick's IT Blog

  • Home
  • About Nick

Automate Hydra’s Resource Service Principal Creation

If you deploy Hydra as much as I do, you know that the Resource Service Principal (the one you input when you add a tenant into Hydra) is a bit of a chore. After you create it, you typically create custom roles, add constraints, add Graph permissions, and assign the roles as needed. It takes a bit of time!

To help with this, I created a script that automates this entire process. The account that signs in must have both owner of the subscription/RG and, if granting/consenting Graph permissions, Entra admin permissions as well.

The output will look something like this. Notice that you can then copy the Tenant ID, App ID, and Secret into Hydra when adding a new tenant. Everything should work like a charm, and the process goes from many minutes to seconds without the potential for human error!

One funny thing I noticed – you actually can’t view the secrets created with this method (using the New-AzADSpCredential) within the Azure Portal. You can only view them using Get-AzADSpCredential. Not sure what the deal with that is (probably the weird blurry line of SP vs registered app), but be aware of that.

The script can be found in my ever-growing Hydra Automations repository – enjoy and reach out if you have issues or questions!

AutomationHydraLogin VSIPowerShell
By Nick BurtonJanuary 2, 2026AVD, Azure, Hydra, Login VSI

Post navigation

Device Policy Causing Black Screens in AVD

Recent Posts

  • Automate Hydra’s Resource Service Principal Creation
  • Device Policy Causing Black Screens in AVD
  • New Hydra Automations GitHub Repository!
  • From Host Pool to Test Bed: Automating AVD with Hydra + Login Enterprise (Part 1)
  • Elevating Test Management with Login Enterprise 6.0

Recent Comments

    Archives

    • January 2026
    • October 2025
    • June 2025
    • April 2025
    • March 2025
    • February 2025
    • November 2024
    • April 2024
    • March 2024
    • February 2024
    • January 2024
    • November 2023
    • September 2023
    • August 2023
    • May 2023
    • January 2023
    • December 2022
    • November 2022
    • October 2022
    • August 2022
    • June 2022
    • January 2022
    • November 2021
    • July 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • December 2020
    • April 2020
    • October 2017
    • August 2017
    • February 2017
    • September 2016
    • May 2016
    • December 2015
    • September 2015
    • August 2015
    • July 2015

    Categories

    • App Packaging
    • App Volumes
    • AVD
    • Azure
    • Bug
    • Citrix
    • Citrix Integrations
    • Device Management
    • Digital Employee Experience
    • General
    • Horizon
    • Horizon View
    • Hydra
    • Imprivata
    • Intune
    • Kerberos
    • Login Enterprise
    • Login VSI
    • MCS
    • Microsoft Entra
    • Networking
    • Office 365
    • Omnissa
    • OPSWAT
    • Power BI
    • PowerCLI
    • Printing
    • PSADT
    • PVS
    • Security
    • Security Advisory
    • Session Metrics
    • SQL
    • SSO
    • True SSO
    • UAG
    • UniFi
    • Universal Web Connector
    • Upgrade
    • VDI
    • VMware
    • Wireless
    • Workspace ONE Access
    • XenApp
    • XenDesktop
    • Zero Trust

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Copyright © All rights reserved. Theme Easy Magazine by Creativ Themes