cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ramandeep_Singh
Regular Visitor

Retrieve User Details in Virtual agent using flows

Hi Everyone,

 

I am trying to get user details using graph APIs "https://graph.microsoft.com/v1.0/me" in power automate. However, when I try to do so I am getting this error:

{
  "error": {
    "code""InvalidAuthenticationToken",
    "message""Access token validation failure. Invalid audience.",
    "innerError": {
      "date""2020-06-30T11:09:37",
      "request-id""<GUID>"
    }
  }
}

 Retrieve logged in user Token using Virtual agentRetrieve logged in user Token using Virtual agent

 

Error while getting details in flowError while getting details in flow

 

Permissions in App registrationPermissions in App registration

 

Any help would be appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Ramandeep_Singh
Regular Visitor

Hi all,

I was able to resolve the issues and it might help others while facing the same issue.
The issue was that I am using "https://graph.microsoft.com/v1.0/me" API and in virtual agent authentication "Scope" I was not using the correct URL.
Following is the screenshot when using graph APIs:


Auth Virtual agent.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks and keep helping each other.

View solution in original post

4 REPLIES 4
renatoromao
Super User
Super User

Hi @Ramandeep_Singh ,

 

Can you take some pictures inside your Http request method inside Power Automate, please? (edit mode to see the code)

Can you confirm which variable do you are sending to Power automate like parameter?


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

Hi @renatoromao ,

 

Thanks for the quick replay. Following are screenshot you asked for:

VA.PNG

 

AAD.PNG

 

Automate.PNG

 

I am using an trial instance for this.

Ramandeep_Singh
Regular Visitor

Hi all,

I was able to resolve the issues and it might help others while facing the same issue.
The issue was that I am using "https://graph.microsoft.com/v1.0/me" API and in virtual agent authentication "Scope" I was not using the correct URL.
Following is the screenshot when using graph APIs:


Auth Virtual agent.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks and keep helping each other.

View solution in original post

Congrats @Ramandeep_Singh ! 🙂

 

Keeping doing a lot of things with Power Virtual Agents!


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

Helpful resources

Announcements
V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

PVA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Kudoed Authors
Users online (1,876)