I'm trying to test a Teams application with delegate azure permissions that will cause the user to consent the scopes when entering at first time.
The main purpose is to remove the Admin dependency and that's including the process of the admin center which there the admin approves the app and uploads it for the users in his organization.
I know that the best approach is to upload the app to the Teams market place (Which will be the next step).
Meanwhile I'm trying to make the end user upload the app independently and I'm facing a major issue :
Trying to make the app like multi tenant by using general redirect URL:
And changing also the Application URI in the azure portal under "Expose an API"
By doing so, My approach is working and the user is indeed redirected to his org site while using the app but in that point when trying to use Microsoft Teams SDK getAuthToken function to extract user SSO token , The function seems to stuck in infinite loop and doesn't return an answer (If I put specific site URL in the manifest and in the application URI it's working).
Any thoughts about this ?
I'm expecting that the Microsoft Teams SDK getAuthToken function will give me an sso token even if the manifest points to a general site which will eventually redirect the user to another site.
The behavior you described is expected because the getAuthToken function relies on the Microsoft Teams app's manifest to determine where the authentication redirect should happen.
When you use a general redirect URL in the manifest, it means that each user in different organizations will be redirected to a different site for authentication. This can cause issues with the getAuthToken function as it may not know how to handle the different redirect URLs for each user.
To address this issue, consider using a single redirect URL for all users instead of using a general redirect URL that redirects users to different sites.