Skip to main content

Notifications

Community site session details

Community site session details

Session Id : u4LajOpf5kepKkMAoefrka
Power Automate - Using Connectors
Unanswered

Custom Connector Graph API - Missing Scope error

Like (0) ShareShare
ReportReport
Posted on 29 Apr 2022 14:47:59 by 11

Hello,

 

created my first Custom Test Connector with a simple wrapper for the Graph API with one simple Action to clone a team

But I'm having trouble with the Scope. The error message is always the same 

 

 

{
 "error": {
 "code": "Forbidden",
 "message": "Missing scope permissions on the request. API requires one of 'Team.Create, Group.ReadWrite.All, Directory.ReadWrite.All'. Scopes on the request 'User.Read'",
 "innerError": {
 "date": "x",
 "request-id": "x",
 "client-request-id": "x"
 }
 }
}

 

 

 

I have done the following:

 

  • created a App Registration with Application permission Teams.Create, TeamMember.ReadWrite.All, TeamSettings.Read.All and granted everything
  • ClientID and Secret is created and valid
  • Created a Custom Connector with the following properties
  • ErikV_0-1651243237548.png

     

  • Defined the Action to clone a team
  • In the Test the request is send but I'm getting the response above

 

Now in Postman I have tried the exakt same thing but with Scope "https://graph.microsoft.com/.default" which postman tells me as I get the error Error: AADSTS1002012: The provided value for scope Teams.Create is not valid. Client credential flows must have a scope value with /.default suffixed to the resource identifier (application ID URI)

I
n Postman the POST REQUEST works as expected as I get a valid 200 Header and with Operations ID 

 

So now how can I make this work in my custom connector ?

 

What to put in Ressource URL and Scope ? 

 

Many Greetings and thx for the help

Erik 

 

  • MarkKeightley Profile Picture
    4 on 21 Jul 2022 at 13:43:53
    Re: Custom Connector Graph API - Missing Scope error

    Hi

     

    I am having a very similar issue to the above as well.

    In my case I've created a custom connector to post a message to a teams chat, using the code shown in example 5 here https://docs.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http I created the app registration for this connector initially with different permissions and then added the required ChatMessage.Send, Chat.ReadWrite afterwards and the error I get suggests that the connector is not seeing these new rights, only the 2 rights I created the app registration with.

    I've tried adding the scopes to in the custom connectors OAuth2 section as mentioned above but that makes no difference.

    I've also tried recreating the both the custom connector and flow from scratch and still it doesn't see the 2 chat permissions I've added.

     

    Does anyone have any clues as to anything else I can try here?   

  • Rhiassuring Profile Picture
    8,688 Super User 2025 Season 1 on 01 May 2022 at 18:27:54
    Re: Custom Connector Graph API - Missing Scope error

    Hi there, 

     

    It looks like you have commas between your scopes -- based on what I read here, you should only have spaces, no commas. Give it a shot again after updating that and let us know how it goes!

     

    Cheers,


    Rhia

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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

#1
WarrenBelz Profile Picture

WarrenBelz 146,765 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics

Loading started