Last active
February 18, 2019 22:12
-
-
Save matt40k/6f20980cfb9c77bd21cff5ce145a8d72 to your computer and use it in GitHub Desktop.
Get a Office365 Tenant ID
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 = "microsoft.com" | |
$tenantId = (Invoke-WebRequest -UseBasicParsing https://login.windows.net/$domain/.well-known/openid-configuration|ConvertFrom-Json).token_endpoint.Split('/')[3] | |
Write-Host $tenantId |
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
#Get-Module AzureADPreview | |
#Install-Module AzureADPreview | |
#Connect-AzureAD | |
$o = Get-AzureADUser -ObjectID matt@pbiuser.com | |
Get-AzureADUser -ObjectID matt@pbiuser.com | select -Expand StrongAuthenticationUserDetails | |
Write-Host $o | |
Write-Host $o.OtherMails[0] | |
Write-Host $o.ProxyAddresses[0] | |
Get-AzureADUser | select DisplayName,UserPrincipalName,otherMails,Mobile,TelephoneNumber | Format-Table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment