Commands › Exchange Online
New-AuthServer
Create an authorization server object in Microsoft Exchange and specify its AuthMetadataUrl. Exchange honors tokens issued by the authorization server for access by a partner application.
Quick start script
# New-AuthServer — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-AuthServer
$before | Format-List
# 3. Make the change (dry run first)
New-AuthServer -Name <String> -AuthMetadataUrl <String> -Type <AuthServerType> -WhatIf
New-AuthServer -Name <String> -AuthMetadataUrl <String> -Type <AuthServerType>
# 4. Verify and diff
$after = Get-AuthServer
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 3 parameter sets
AuthMetadataUrl
New-AuthServer [-Name] <String> -AuthMetadataUrl <String>
[-GraphBaseUrl <String>]
[-TrustAnySSLCertificate]
[-Confirm]
[-DomainController <Fqdn>]
[-DomainName <MultiValuedProperty>]
[-Enabled <Boolean>]
[-WhatIf]
[<CommonParameters>]
NativeClientAuthServer
New-AuthServer [-Name] <String> -AuthMetadataUrl <String> -Type <AuthServerType>
[-TrustAnySSLCertificate]
[-Confirm]
[-DomainController <Fqdn>]
[-DomainName <MultiValuedProperty>]
[-Enabled <Boolean>]
[-WhatIf]
[<CommonParameters>]
AppSecret
New-AuthServer [-Name] <String> -Type <AuthServerType>
[-ApplicationIdentifier <String>]
[-Confirm]
[-DomainController <Fqdn>]
[-DomainName <MultiValuedProperty>]
[-Enabled <Boolean>]
[-WhatIf]
[<CommonParameters>]
Parameters (11)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.