Skip to main content

Notifications

Copilot Studio - Building Copilot Studio Chatbo...
Unanswered

AccessToken is not updated after the initial token is expired.

(0) ShareShare
ReportReport
Posted on by 67

I build a chatbot using Power Virtual Agents (preview version).

I set up SSO with AzureAD and deploy the chatbot to Microsoft Teams.

It works for first 1-2 hours, but after that (maybe after the initial token is expired) I cannot access 'System.User.AccessToken' information and I get 'InfiniteLoopInBotContent' error. It seems the bot try to re-authenticate but it doesn't work.

 

And, 'System.User.AccessToken' is not in the variable list. (So, I open 'code editor' and type it manually).

 

Help.

  • T_TERADA Profile Picture
    T_TERADA 67 on at
    Re: AccessToken is not updated after the initial token is expired.

    Hi Henry,

    My chatbot call a REST API to server in Azure. In this API, I'd like to use AccessToken.

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: AccessToken is not updated after the initial token is expired.

    Thanks @T_TERADA, out of curiosity, what are the security concerns with using the native Only in Teams setting?

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: AccessToken is not updated after the initial token is expired.

    Thanks @T_TERADA, out of curiosity, what are the security concerns with using the native Only in Teams setting?

  • T_TERADA Profile Picture
    T_TERADA 67 on at
    Re: AccessToken is not updated after the initial token is expired.

    Hi Henry,

    Thank you for your information.

    I'd like to use AuthToken instead of UserID due to security reason.

    But, I'll 'Only in Teams authentication setting' instead until SSO is supported.

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: AccessToken is not updated after the initial token is expired.

    Hi @T_TERADA 

    I don’t believe SSO is supported for the Microsoft Teams channel on the preview version, yet. The documentation calls out it’s only supported for custom websites: 

    https://learn.microsoft.com/en-us/power-virtual-agents/preview/configure-web-sso

     

     

    In Power Virtual Agents preview, SSO is supported for the custom website channel only. It's not supported for the following channels:

    • Azure Bot Service
    • Demo website
    • Facebook
    • Microsoft Teams
    • Mobile app

     

    Can you use the Only in Teams authentication setting instead? 

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard

Featured topics