Microsoft Teams: [Forbidden] User Id must match the API caller when called in delegated mode

  • 16 August 2023
  • 0 replies
  • 32 views

Userlevel 1
Badge

“Error: [Forbidden] User Id must match the API caller when called in delegated mode.” 

 
Issue: Thrown when making an API call in delegated mode and the User ID specified does not match the identity of the API caller. 

Fixes: 

  • Ensure that the User ID matches the Identity of the user who the API call is being made on behalf of. The Authenticated user must have the necessary permissions to act on behalf of the specified user.  

  • Make sure you are using the correct User ID/ have no typos in the User ID 

  • Authenticate with the correct user, make sure the authentication process is obtaining the necessary access token or credentials for the user. 

  • Check permissions: Ensure that the authenticated user has the appropriate permissions to act on behalf of the specified user. Review the documentation for the specific API you're using to determine the required permissions and ensure they are granted to the calling user. 


This topic has been closed for comments