Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
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.

  • Jaden11 Profile Picture
    7 on at
    Re: Problems about Accesstoken and Graph api

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

  • Jaden11 Profile Picture
    7 on at
    Re: Problems about Accesstoken and Graph api

    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
    Re: Problems about Accesstoken and Graph api

    Thank you so much! Will try.

  • citron-truc Profile Picture
    389 on at
    Re: Problems about Accesstoken and Graph api

    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.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

#1
Pablo Roldan Profile Picture

Pablo Roldan 27

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard