[Bug]: "oauthFlows" does not exists

Open Beginner friendly
#2,976 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nodejs, typescript

Research direction

Start with examples/oauth/src/index.ts and its package.json, then install the pinned SDK dependencies and run the example's build or type check. Compare the AppOptions and App type declarations used by SDK version 2.0.16 with the example's oauthFlows and getOAuthFlow references; done means the cloned OAuth example builds without these TypeScript errors.

Written by the indexing model from the issue text.

Description

bug
Bug Description

I cloned this example https://github.com/microsoft/teams.ts/tree/main/examples/oauth

I am getting error for

oauthFlows
https://github.com/microsoft/teams.ts/blob/223616812417037cf8e105d49849c9207ce2e7dc/examples/oauth/src/index.ts#L10
Error: Object literal may only specify known properties, and 'oauthFlows' does not exist in type 'AppOptions<IPlugin<{}, {}>>'.

app.getOAuthFlow
https://github.com/microsoft/teams.ts/blob/223616812417037cf8e105d49849c9207ce2e7dc/examples/oauth/src/index.ts#L17
Error: Property 'getOAuthFlow' does not exist on type 'App<IPlugin<{}, {}>>'.

package.json

"dependencies": {
    "@microsoft/teams.apps": "*",
    "@microsoft/teams.common": "*",
    "@microsoft/teams.graph": "*",
    "@microsoft/teams.graph-endpoints": "*"
  },

NodeJS 24.18.0
Steps to Reproduce
  1. Clone https://github.com/microsoft/teams.ts/tree/main/examples/oauth
  2. NPM Install
  3. Review the error
Expected Behavior

Successfully build the cloned example https://github.com/microsoft/teams.ts/tree/main/examples/oauth

Actual Behavior

I am getting error for

oauthFlows
https://github.com/microsoft/teams.ts/blob/223616812417037cf8e105d49849c9207ce2e7dc/examples/oauth/src/index.ts#L10
Error: Object literal may only specify known properties, and 'oauthFlows' does not exist in type 'AppOptions<IPlugin<{}, {}>>'.

app.getOAuthFlow
https://github.com/microsoft/teams.ts/blob/223616812417037cf8e105d49849c9207ce2e7dc/examples/oauth/src/index.ts#L17
Error: Property 'getOAuthFlow' does not exist on type 'App<IPlugin<{}, {}>>'.

SDK Version

2.0.16

Languages Affected

TypeScript

Dominant language
TypeScript
Stars
729
Forks
270
Avg merge
2d 4h
Merged PRs (30d)
19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/teams-sdk

All issues in microsoft/teams-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.