web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / direct line secret not...
Copilot Studio
Suggested Answer

direct line secret not refreshed/invalid

(0) ShareShare
ReportReport
Posted on by 2

I have generated new Direct Line secrets.
However, the UI still displays the old secrets, which are no longer valid.
When I request a token with a curl, I also receive confirmation that the secret is no longer valid:

‘error’: {

   ‘code’: ‘BadArgument’,

   ‘message’: ‘Invalid token or secret’

}

In addition, identical keys are displayed for Secret 1 and Secret 2, which is also incorrect.
This also happens with a newly created agent that has not yet been published, even if no new secret has been generated yet.

I have cleared the browser cache and also tested using a different browser. So the problem lies with Microsoft.

I have the same question (0)
  • Suggested answer
    Beyond The Platforms Profile Picture
    225 on at

    Hi there,
    Here are a few things to check and try:

     

    1. Check DLP Policies
    Since January 2025, Microsoft enforces stricter DLP policies on Copilot Studio agents. If the Direct Line connector is blocked in your tenant's Data policies (Power Platform Admin Center → Data policies), secrets will be generated but won't work. Make sure it's not in the "Blocked" group.

     

    2. Publish the agent first
    Direct Line secrets may not work correctly on agents that have never been published. Publish the agent at least once, then go back to Settings → Security → Web channel security and check if the secrets are now different.

     

    3. Toggle "Require secured access"
    Try disabling "Require secured access", wait up to 2 hours for propagation, then re-enable it. Microsoft docs confirm changes can take up to 2 hours to take effect.

     

    4. Regenerate secrets properly
    Copilot Studio provides two secrets for zero-downtime rotation. Start using Secret 2 in your app, then regenerate Secret 1. After regeneration, verify they show different values. If they're still identical, that's a platform bug.

     

    5. If nothing works → open a support ticket
    The fact that Secret 1 and Secret 2 show identical values — even on brand-new agents — strongly suggests a platform-side issue. I'd recommend opening a support ticket via Power Platform Admin Center with these details.

    Hope this helps!
    Paolo


    Did this solve your issue? → Accept as Solution
    👍 Partially helpful? → Click "Yes" on "Was this reply helpful?" or drop a Like!


    Want more tips on Power Platform & AI? Follow me here:

    🔗 LinkedIn: https://www.linkedin.com/in/paoloasnaghi/
    ▶️ YouTube: https://www.youtube.com/@BeyondThePlatforms
    📸 Instagram: https://www.instagram.com/beyond_the_platforms/
    🌐 Website: https://www.beyondtheplatforms.com/


     

  • TA-21011222-0 Profile Picture
    2 on at

    Thanks for your reply. I just stumbled across this old post of mine and realized there's an answer now.

    We've since moved away from Copilot Studio because there were too many issues with the system, and above all because Microsoft deprecated Prompt Flows.

    Copilot Studio was only our UI layer for Prompt Flows.

    Unfortunately I can't verify your answer since we no longer work with the system. Still, thanks a lot for your reply.

    Best regards,
    Thomas

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 249

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 180 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 153

Last 30 days Overall leaderboard