I am attempting to make an app to display on a sharepoint page.
The premise is it's an app for people to select gifts to donate. The gift information is pulled from a sharepoint list and each record is displayed as an ornament on a tree. When you select an ornament it displays the record in a gallery.
When you select the gallery item it emails the gift details to the user, along with instructions. Subsequently, the list record is patched to indicate the gift is selected and causes the selected ornament to disappear off the tree and the corresponding present to appear under the tree.
It all seems to work fine but when I published it and had somebody else try I ran into issues. Primarily it appeared they were running a complete different instance of the app. When they selected a gift the ornament disappeared, the present appeared, they received the email. But the sharepoint list did not get updated indicating the gift was selected. I'm confused how that can be. I thought maybe a refresh issue but after refreshing I still couldn't see the changes they made reflected in my version of the app.
Also, when I use the app and it sends the email, I'm basically sending an email to myself. When they use the app they also receive an email from themself with the gift details. I thought the outlook connector meant all the emails would be sent through my mailbox, so I'm a bit confused what's going on here.
Can anybody point me in the right direction?
Hi @Bigjoemonger! Sounds like a great app! You may need to check the SharePoint permissions to make sure that the people using the app have proper access. If they can't write to the list due to not having write permissions, Power Apps won't supersede that; it uses their account permission level for the connected list. If that all checks out, could you share the code you are using to patch the data back to SharePoint? That might help point in the direction of why things aren't writing there.
As for the email address, I assume you are using the Office 365 Outlook connector. With this connector, each user is logged in to their email account as well, so any mail sent from that connector will appear as if it comes from the logged in user...at least using the SendEmailV2 function. Instead, try using the SharedMailboxSendEmailV2 function. This function will allow you to specify a shared email to send from. I use this for sending notification type emails from a shared "email@example.com" address. This could be a solution if you have the ability to set up a shared email; they are free and you can have as many as you like but you do need admin access to your Office 365 tenant to create one. As a test, I tried sending an email from my own address using this function and it worked but I don't know if it will work on the user's end. There may be some permission issues (for example, I am delegated to send email from my own account but no one else in my company is). You could try this out though and see if it works.
Maybe see if any of those suggestions help and let me know how it goes? I'm happy to follow up if none of those ideas work!
Currently I have the app permission set to everyone can use. And the sharepoint list is saved on a sharepoint communications site. I am the site owner with full control. Everyone else is read only.
So if I set everyone to "contribute" for the list then everyone should be able to see the same instance of the app. So if I make an update, and another person refreshes they'll see the change?
Unfortunately I cannot create a shared mailbox. My work requires users to have specific accounts tied to their access. It's not a dealbreaker I just thought it was weird because once I tried creating a flow connected to microsoft forms for recording work hours in a spreadsheet and automatically submitting them to the proper person. But when I shared it with people they didnt like it because it was sending their work hours through my email so I could see everything. It's weird it would work one way in power automate but works a different way in power apps.
@Bigjoemonger I believe that should work, yes. I'm not overly familiar with communications sites in SharePoint but I think there are only two levels of permissions: those who can read the data and those who can read and write (the contributor permission you referred to). So in order to submit data to your list, each user would need that level of permission on the SharePoint site. I'm not sure how ownership of records is handled with those types of sites either, so that may be something you might want to look into. I would assume that all contributors could access all data but it might not be that way. In Team sites there is a bit more control over who can see what data; for instance, you could make it so people only see the data they own or make it so they can see all the data in the list.
Regarding the flow difference, I agree that it can be a bit strange how the data is handled compared to Power Apps. I think this is a bit of a licensing and flow ownership issue. Any flows that you own, you would be able to see the runs (and by extension the data). I don't know if there is a way to get around this as you would need to be able to troubleshoot the flow and see where it was breaking, which means checking out the data involved. Maybe a service account model could be something to look into as it could get around some of those types of scenarios, so that data would go through a service account and not an individuals account.
I hope that helps!
Find your favorite faces from the community presenting at the Power Platform Community Conference!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Features releasing from October 2020 through March 2021