Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to exchange Online with certificates instead of basic authentication #11

Open
carrk-osu opened this issue Aug 26, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@carrk-osu
Copy link
Collaborator

Using a certificate thumbprint with a certificate already imported within Azure

# Set the needed settings to connect to EOL with a service account
$EOLSettings = @{
    CertificateThumbPrint = $env:CertificateThumbprint
    AppID = $env:ClientID
    Organization = "OregonStateUniversity.onmicrosoft.com"
    ShowBanner = $false
}

# Use "Splatting" to use the settings as the input for the command to connect to EOL
Connect-ExchangeOnline @EOLSettings

Using a certificate and the plaintext password to connect

$EOLSettings = @{
    # Set the needed settings to connect to EOL with a service account
    CertificateFilePath = ".\EXAMPLE.pfx"
    CertificatePassword = (ConvertTo-SecureString -String $env:CertificatePassword -AsPlainText -Force)
    AppID = $env:ClientID
    Organization = "OregonStateUniversity.onmicrosoft.com"
    ShowBanner = $false
}

# Use "Splatting" to use the settings as the input for the command to connect to EOL
Connect-ExchangeOnline @EOLSettings
@carrk-osu carrk-osu added the enhancement New feature or request label Aug 26, 2020
@carrk-osu
Copy link
Collaborator Author

  • Currently the Connect-ExchangeOnline function technically supports these features but only works on 'Desktop' versions of PowerShell.
  • We should stop using basic authentication and start using certificates instead when Microsoft fixes this command to work with PowerShell "Core" versions.
  • The code attached above can be used for testing and the final replacement to basic authentication.
  • This issue can be disregarded If Microsoft provides a new Graph API that allows for changing the visibility setting in the GAL rather than using PowerShell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant