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

Notification blob storage is not filled #615

Open
Aaron0176 opened this issue Jan 25, 2023 · 9 comments
Open

Notification blob storage is not filled #615

Aaron0176 opened this issue Jan 25, 2023 · 9 comments
Assignees

Comments

@Aaron0176
Copy link

Question based on #355.

I'm facing the issue that my bot installations are not recognized when I deploy my app to Azure.

That's why I try to introduce a blob storage as described here.

My container is created successfully and I don't see error, but container stays empty and no bot installations seem to be persisted.

Any ideas?

image

@jamesburton85
Copy link

Im having the same issue, did you manage to resolve this?

@Aaron0176
Copy link
Author

Hi James, for me it was related to the single tenancy setting of my AAD app...

Find the detailed discussion here:
MicrosoftDocs/msteams-docs#7920

@swatDong
Copy link
Contributor

The initial issue was solved per MicrosoftDocs/msteams-docs#7920
To use single tenancy bot, make sure @microsoft/teamsfx SDK is upgraded to ^2.2.0 and set correct MicrosoftAppType and MicrosoftAppTenantId.

@swatDong
Copy link
Contributor

@jamesburton85 - do you still have the issue? Would you mind share more details or file another issue to track?

@muiruri
Copy link

muiruri commented Apr 20, 2023

I am facing this issue, it has been 2 days of trying and nothing seems to work.
I have a Teams SSO Tab app, I added the Notification Bot feature and everything works okay when running locally. After provisioning and deploying to Azure, the notification bot isn't working. I added Storage and noticed that the installation is not being recorded. I have timerTrigger which executes but finds no installations. The storage container is empty.

I created a totally new Teams SSO Tab app and added the notification bot feature. This also did not work either. The Storage container is created but not installation is recorded.

I created a Standalone Notification Bot and this worked okay without any issue.

I added SSO enabled Tab feature to the Bot application and after provisioning, deploying and running, the installation is not being recorded. I had uninstalled the Bot and the installation was removed from the container.

Is there any special case with SSO Tab + Notification Bot when they are together?

@swatDong
Copy link
Contributor

swatDong commented Apr 20, 2023

@muiruri - Since your app works well on local, there may be some mis-configuration on your Azure resources. Is it convenient for you to share your .bicep files? Feel free to remove any personal info such as resource name or app settings.

@muiruri
Copy link

muiruri commented Apr 20, 2023

@swatDong They are all the auto generated files, I only edited the botService.bicep to add the msaAppType value of MultiTenant

The bicep files from ./templates/azure/provision

botService.bicep : https://pastebin.com/04uxQdBS
azureFunctionBot.bicep : https://pastebin.com/C9btGD55
identity.bicep : https://pastebin.com/a8jgQ7s5
frontendHosting.bicep : https://pastebin.com/7yD9DbGj

@swatDong
Copy link
Contributor

@muiruri Your bicep files from ./templates/azure/provision look good.

I tried on my side and can also repro your issue. The cause I found is that "Authentication is enabled on the Azure Functions". It seems the templates/azure/teamsFx/azureFunctionBotConfig.bicep has unexpected auth settings (diff from the pure notification project).

A quick workaround is - disable the auth in templates/azure/teamsFx/azureFunctionBotConfig.bicep and provision again.
image
Also verify the status from Azure Portal:
image
After that, you can message your bot (or uninstall / reinstall) to see if installation is added to your storage container.

@hund030 - FYI since it's related to azure function bicep. I'll log a bug to track internally.

@muiruri
Copy link

muiruri commented Apr 21, 2023

@swatDong Thanks for your help. It is now working.

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

4 participants