Error Message When Attempting to Allow Legacy Exchange Tokens in Exchange Online

Sam Bennett 20 Reputation points
2025-02-04T17:12:57.5366667+00:00

I am attempting to allow legacy exchange tokens because an Outlook plug-in requires it. I am following the instructions outlined here: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/turn-exchange-tokens-on-off

After connecting to Exchange Online Management via PowerShell and running the command:

Set-AuthenticationPolicy AllowLegacyExchangeTokens -Identity "LegacyExchangeTokens"

I receive the following error:

Set-AuthenticationPolicy : A positional parameter cannot be found that accepts argument >'AllowLegacyExchangeTokens'. At line:1 char:1

  • Set-AuthenticationPolicy AllowLegacyExchangeTokens -Identity "LegacyE ...
  • CategoryInfo : InvalidArgument: (:) [Set-AuthenticationPolicy], >ParameterBindingException
    • FullyQualifiedErrorId : PositionalParameterNotFound,Set-AuthenticationPolicy

How can I allow legacy tokens if it will not let me?

Thank you!

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Outlook Windows Classic Outlook for Windows For business
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2025-02-05T01:42:39.6933333+00:00

    Hello, @Sam Bennett

    Welcome to the Microsoft Q&A platform!

    According to the error message, there is an issue with your parameter. Please check it carefully in order not to miss any key point like "-".

    User's image

    After finishing this adjustment, you may run the cmdlet successfully. User's image

    Should you need more help on this, you can feel free to post back. 


    If the answer is helpful, please click on “Accept answer” as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.

    Thank you for your support and understanding.

    Best Wishes,

    Alex Zhang

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Alex Sanger 0 Reputation points
    2025-02-05T09:23:18.93+00:00

    Can confirm - the command to enable legacy tokens is given correctly on the page OP referenced, but if you copy that command and paste it into PowerShell it drops the hyphen before the AllowLegacyExchangeTokens parameter. I didn't spot it until I read this article.

    Thanks!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.