Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in webApplicationInfo.resource Configuration and Its Impact on microsoftTeams.authentication.getAuthToken() Behavior #2644

Open
asith-w opened this issue Dec 1, 2024 · 4 comments

Comments

@asith-w
Copy link

asith-w commented Dec 1, 2024

Issue:

Below are two configurations of the webApplicationInfo property from the Teams app manifest:

Configuration 1:

{
  "webApplicationInfo": { 
    "id": "1234b47a-0d54-0000-1111-92940bc85c11",
    "resource": "api://mydmn.net/botid-1234b47a-0d54-0000-1111-92940bc85c11"
  }
}

Configuration 2:

{
  "webApplicationInfo": { 
    "id": "1234b47a-0d54-0000-1111-92940bc85c11",
    "resource": "api://mydmn.net/1234b47a-0d54-0000-1111-92940bc85c11"
  }
}

Key Question:

The difference between the two configurations lies in the resource property:

  1. Configuration 1 includes the botid- prefix in the resource value.
  2. Configuration 2 excludes the botid- prefix.

Why does the microsoftTeams.authentication.getAuthToken() function behave differently for these configurations, as described in GitHub Issue #2196?

Request:
could anybody clarify the difference between these two configurations and explain how the resource value affects authentication behavior. Additionally, it would be helpful to understand the expected behavior for both scenarios and the correct way to configure the webApplicationInfo property to ensure consistent functionality.

@Meghana-MSFT
Copy link

@asith-w - Thank you for reporting this, we will check this and get back to you.

@Meghana-MSFT
Copy link

@asith-w - You can use configuration 2 if your app is only a tab app.

You can use configuration 1, if you're building an app with a bot, a messaging extension, and a tab.

@asith-w
Copy link
Author

asith-w commented Dec 5, 2024

@Meghana-MSFT Thank you for the reply .

Is there a specific reason why the Teams app development maintains these two formats of URI (why can't those have same ability)?
Will both URI formats offer the same capabilities in the future?

@Meghana-MSFT
Copy link

@asith-w - We currently do not have any info if both URI formats will offer the same capabilities in the future. The doc will be updated if there are any updates to this in future. You can also subscribe to RSS feed to get latest Teams platform updates
What's new - Teams | Microsoft Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants