Created
July 1, 2021 19:25
-
-
Save joerodgers/fbf418a4347cf1be48dbf3ee86a59310 to your computer and use it in GitHub Desktop.
Get's the TenantId (and other info) from the domain name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$domain = "contoso.com" | |
Invoke-WebRequest -Uri "https://login.windows.net/$domain/v2.0/.well-known/openid-configuration" | ConvertFrom-Json | |
<# | |
token_endpoint : https://login.windows.net/1316cd1f-b0c7-4253-a7f3-ccc9041aaag9/oauth2/v2.0/token | |
token_endpoint_auth_methods_supported : {client_secret_post, private_key_jwt, client_secret_basic} | |
jwks_uri : https://login.windows.net/1316cd1f-b0c7-4253-a7f3-ccc9041aaag9/discovery/v2.0/keys | |
response_modes_supported : {query, fragment, form_post} | |
subject_types_supported : {pairwise} | |
id_token_signing_alg_values_supported : {RS256} | |
response_types_supported : {code, id_token, code id_token, id_token token} | |
scopes_supported : {openid, profile, email, offline_access} | |
issuer : https://login.microsoftonline.com/1316cd1f-b0c7-4253-a7f3-ccc9041aaag9/v2.0 | |
request_uri_parameter_supported : False | |
userinfo_endpoint : https://graph.microsoft.com/oidc/userinfo | |
authorization_endpoint : https://login.windows.net/1316cd1f-b0c7-4253-a7f3-ccc9041aaag9/oauth2/v2.0/authori | |
ze | |
device_authorization_endpoint : https://login.windows.net/1316cd1f-b0c7-4253-a7f3-ccc9041aaag9/oauth2/v2.0/devicec | |
ode | |
http_logout_supported : True | |
frontchannel_logout_supported : True | |
end_session_endpoint : https://login.windows.net/1316cd1f-b0c7-4253-a7f3-ccc9041aaag9/oauth2/v2.0/logout | |
claims_supported : {sub, iss, cloud_instance_name, cloud_instance_host_name...} | |
kerberos_endpoint : https://login.windows.net/1316cd1f-b0c7-4253-a7f3-ccc9041aaag9/kerberos | |
tenant_region_scope : NA | |
cloud_instance_name : microsoftonline.com | |
cloud_graph_host_name : graph.windows.net | |
msgraph_host : graph.microsoft.com | |
rbac_url : https://pas.windows.net | |
#> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment