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 / How to access custom v...
Copilot Studio
Answered

How to access custom variables in Copilot Studio agent without authentication

(2) ShareShare
ReportReport
Posted on by 30

Hi Everyone,

 

I am creating a Copilot Studio agent for our ERP system. The use case is based on student information, where I want to process queries and provide outputs from ERP data.

Currently, I see GenericAuth works only with Microsoft accounts. But in our ERP, we already have our own default ID/password authentication. For my agent, I don’t want authentication at all — I just want to pass a custom variable (like student ID or session token) directly to the agent and use that in API calls.

 

My questions:

  1. Is there a way in Copilot Studio to set and access custom variables (like studentId, sessionToken, etc.) without going through OAuth/GenericAuth?

  2. If authentication is not required, what’s the recommended approach to safely pass these custom values from the client to the agent?

This will help me integrate ERP functionality without forcing external users to authenticate with Microsoft accounts.

 

Thanks in advance!

Categories:
I have the same question (2)
  • Verified answer
    CU15080535-4 Profile Picture
    16 on at
    Hi,
     
    You have to use global variables with “External sources can set values” and pass them in as context parameters when you embed or call your bot.
     
    Setup Global External variable.
    1. In your bot, create a Global variable (e.g., studentId, sessionToken).

    2. In the variable’s properties, check External sources can set values.

    3. Use these variables anywhere in your topics or when calling APIs via Power Automate/Agent actions.

    Passing Values From Your Client to the Agent

    If you’re embedding the bot in a web page or app:
    • When you load the Copilot iframe or Web Chat, append your variables as query parameters or pass them in the context object.
    Please let me know if you need more information. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 594

#2
chiaraalina Profile Picture

chiaraalina 170 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 118

Last 30 days Overall leaderboard