-
Notifications
You must be signed in to change notification settings - Fork 487
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
TeamsSSOTokenExchangeMiddleware.DeduplicatedTokenExchangeIdAsync fails on BlobStorage ETag validation #6861
Comments
We are facing the same issue :( |
For some further information - we're doing client login/logout via Teams following this example: If we use MemoryStorage as our IStorage implementation it works as expected with no errors. We have not tested CosmosDb. |
To try and make things a little easier to debug, I've created a reproduction case using the above example. Clone the above branch of my fork and you will get a c# project with our reproduction case. Note that when run with no blob configuration it uses At this point it is not entirely clear to me if this is actually a bug in the Hopefully this reproduction will assist. Cheers! |
…IdAsync fails on BlobStorage ETag validation (#6867) * add catch to capture 412 error in BlobsStorage * use HttpStatusCode
The original issue was a bug with BlobsStorage, as it behaved differently than the rest of the storage options (MemoryStorage and CosmosDb). |
Version
4.22.9
Describe the bug
The TeamsSSOTokenExchangeMiddleware fails in DeduplicatedTokenExchangeIdAsync when Microsoft.Bot.Builder.Azure.Blobs is used as the IStorage provider if/when the WriteAsync method returns a concurrency/etag exception.
As a result the system throws Azure.RequestFailedException
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It appears as though the adapter already detects similar errors for MemoryAdapter and the CosmosDb adapter but it is not detecting the error from Azure BlobStorage. I would expect that blob storage would be similarly handled.
Screenshots
No screenshots at this time
Additional context
This seems to already be handled by the middleware for MemoryAdapter and CosmosDB.
Does this just need to be extended to look for the Azure BlobStorage version of the exception?
Example failure:
Example Stack Trace:
The text was updated successfully, but these errors were encountered: