Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Custom Connector for Microsoft Graph API - Access issues

(0) ShareShare
ReportReport
Posted on by 31

Hey guys, im having an issue trying to get a custom microsoft graph api conencotr to work. I'm trying to set up a flow that fetches emails accross my organization, the issue im having is that it works fine for my own emails, but if its someone else's email, it gives me this:

{
 "error": {
 "code": "ErrorAccessDenied",
 "message": "Access is denied. Check credentials and try again.",
 "innerError": {
 "date": "2020-08-07T16:02:39",
 "request-id": "0c870661-d8b6-4a1d-8cde-55f85f5e93d0"
 }
 }
}

 

here's what my api permissions look like on the azure side:
SharedScreenshot.jpg

 

 

What am i missing here?

  • Verified answer
    Anupam.khasia Profile Picture
    Anupam.khasia 343 on at
    Re: Custom Connector for Microsoft Graph API - Access issues

    Hi @Oyster ,

     

    This is due to connection of the flow. You have created and connected using your mailbox account. In order to read other account's messages you can share flow to that users and ask them to configure their connections.

     

    You could create multiple similar Flows and then use their accounts to configure connection.

    If other users have a Flow license and are members of the organization, you could create Teams Flow and let other users change the connection themselves.

    For the creation of Teams Flow and the sharing of Flow, you could refer to the following link:

    https://docs.microsoft.com/en-us/flow/create-team-flows

     

    Thanks

    Anupam

    (please mark resolved if it helps you)

  • Oyster Profile Picture
    Oyster 31 on at
    Re: Custom Connector for Microsoft Graph API - Access issues

    sure. so basically im receiving a notification from Microsoft graph whenever mail goes in or out for specific users in our organization. i setup a flow that receives that notification via http request here:

    flow1.jpg

    So i receive the request notification and it gives me the user and the message id. Because this same url endpoint is used to also validate the notification subscription when its initially setup, the conditional step determines if there's a validation token in the request, and if so, it sends it back to validate. the validation works fine, its the next part, when i actually receive a message notification that breaks:
    flow2.jpg

    so under, "If yes" i then use my custom connector to fetch the message from the notification using the get mail request here.
    so, both when i test the connector on the custom connector editor, and when i run the flow, it works for my own emails. however, whenever its trying to run for another user's emails, it fails like this:
    flowfail.jpg

    I am a global admin for my org. Also, from my original post, you can see how i have Azure setup for Microsoft graph. Am i missing something? is this sort of delegated permissions not compatible with flow? or is there something i need to change on my account besides being an admin?

    Thanks for your reply!

     

     

     

  • Anupam.khasia Profile Picture
    Anupam.khasia 343 on at
    Re: Custom Connector for Microsoft Graph API - Access issues

    Hi @Oyster ,

     

    Can you explain what you meant by " if its someone else's email, it gives me this" ? Is he belongs to your organization or other ? Also could you please post actions and steps you are doing with your flow ? 

     

     

     

    Thanks

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,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics