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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Problems about Accesst...
Copilot Studio
Unanswered

Problems about Accesstoken and Graph api

(0) ShareShare
ReportReport
Posted on by 7

Hello,

I am trying to make a function which can generate (by chatgpt api) and send email (by graph api) on copilot studio, then launch the bot to Teams for the whole company's users.
My current problems are:

 

1. I used to use connector from power automate to make this function, however, whoever using this feature in the bot, the email sent from my email address not the users. Is this function possible to make?


2. So, I moved to graph api to make this function, I set up 'login manually' to get the 'user.accesstoken'. But the thing is this token is NOT the same accesstoken from Microsoft graph website, so it also not working.

Is anyone able to assist me? Really appreciate to any comments. I am currently new internship to my company, so all the tech workers don't have time to help me about that.

Categories:
I have the same question (0)
  • citron-truc Profile Picture
    394 on at

    Good morning,

    I hope you are doing well. I am curious about solution number 2. I use my user access token to consult the graph API and get the list groups for my user (and the access token works). I create a variable [bearer_token = "Bearer " & System.User.AcessToken] and do my Http call with "bearer_token" as the Authorization.

    citrontruc_0-1715846077736.png

    In order to do tests, try to print your access token, copy paste it in postman and do your tests in postman.

    Hope it helps,
    Have a great day.

  • Jaden11 Profile Picture
    7 on at

    Thank you so much! Will try.

  • Jaden11 Profile Picture
    7 on at

    Hi,

     

    Thank you for the answer! I did a lot of research and try a lot this week, and I think my problem comes from the version of the access token, I believe that in my copilot studio, the access token is V1.0, but in the graph api, we need V2.0 version to call.

    For me, I use Azure Active Directory v2 to set up the manual login, maybe this is where the issues come from? I will also try OAuth 2.

    Jaden11_0-1716226634041.png

    It would be really helpful if you can provide some information about how you set up the manual login

    Thank you for your time.

  • Jaden11 Profile Picture
    7 on at

    Solved, just need to use Generic OAuth 2 to set up the manual login, so that I can choose v2.0 access token.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 250 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 197 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 103 Moderator

Last 30 days Overall leaderboard