Get the Microsoft tenant GUID with PowerShell

This PowerShell one-liner will return the Tenant ID replace <TENANT> with your tenant name.

(Invoke-WebRequest -Uri "https://login.windows.net/inspectplus.onmicrosoft.com/.well-known/openid-configuration" -UseBasicParsing | ConvertFrom-Json).authorization_endpoint.Split('/')[3]

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *