cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PaulT
Frequent Visitor

Issue sharing a PowerApp with a guest user

I am designing a PowerApp to be used with some external users. It will be used to allow them to fill out a form which sends data back to a SharePoint list.

I created the app, created some guest users in my tenant and I am successful in having them write back to the SharePoint list. I am now trying to only show them the list items that they are responsible for by filtering using email addresses. If I use a regular (non-guest) account then everything works just fine. I use the Office365Users connection to retrieve the email address of the current user.

When I try it with a guest users I get an error that access is denied to the Office365Users connector.

I have assigned the external users full Office licenses (for testing) and they can access the SharePoint lists but it's just the Office365 connector.

Can anybody tell me what I am doing wrong?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Issue sharing a PowerApp with a guest user

Hi @PaulT , 

The reason why Office365Users.MyProfile().Mail works, but  Office365Users.MyProfileV2().Mail not works is that the result of these two functions are different.

You need to use:

Office365Users.MyProfileV2().mail

1)The result of  Office365Users.MyProfile():

519006.PNG

 //The email column named Mail.

 

2)The result of  Office365Users.MyProfileV2():

519005.PNG

 

//The email column named mail.

 

 

Please read this doc about this connector in details:

https://docs.microsoft.com/en-us/connectors/office365users/#user

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Community Support
Community Support

Re: Issue sharing a PowerApp with a guest user

Hi @PaulT ,

Do you want to share an app connected with office365 users to external user?
I've made a similar test but not met the same problem like your description.

However, since you are an external user, you need to switch account when asking for permission of office365 users.

Switch to your external account.

5130.PNG

 

 Then choose your external account for multiple times.

Wait for a minute, the user email will show.

The formula that I use to show email:

Office365Users.MyProfile().Mail

 

 

What's more, if you still has problems, you do not need to use office365 users connector to get current user's email.

This formula is enough:

User().Email

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulT
Frequent Visitor

Re: Issue sharing a PowerApp with a guest user

Thank you for your reply.

The problem with User().Email is it does not necessarily give the user's email address but it actually gives the user's UPN. Normally this might not be a problem but with guest accounts the UPN shows as "live#useremail@outlook.com".

Since we are creating the accounts this will always be the way it shows up (I hope) so I will just work to strip out the "live#" portion of the UPN and try using that.

Community Support
Community Support

Re: Issue sharing a PowerApp with a guest user

Hi @PaulT ,

I do not mean that you set user's email when designing the app.

You could only make user switch to his account when he is running this app.

And the permission could only be allowed when he is running this app.

It can not be set in advance.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulT
Frequent Visitor

Re: Issue sharing a PowerApp with a guest user

Community Support
Community Support

Re: Issue sharing a PowerApp with a guest user

Hi @PaulT ,

Actually, this license should be enough.

This error message should be about permission.

Please check whether you give the guest user the permission of viewing azure profile.

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulT
Frequent Visitor

Re: Issue sharing a PowerApp with a guest user

So I don't think it is a permissions issue. I switched to using Office365Users.MyProfile().Mail (instead of Office365Users.MyProfileV2().Mail and now things are working properly. 

I don't know if this is by design or a bug but it looks like MyProfileV2 doesn't work with the guest user accounts. 

Community Support
Community Support

Re: Issue sharing a PowerApp with a guest user

Hi @PaulT , 

The reason why Office365Users.MyProfile().Mail works, but  Office365Users.MyProfileV2().Mail not works is that the result of these two functions are different.

You need to use:

Office365Users.MyProfileV2().mail

1)The result of  Office365Users.MyProfile():

519006.PNG

 //The email column named Mail.

 

2)The result of  Office365Users.MyProfileV2():

519005.PNG

 

//The email column named mail.

 

 

Please read this doc about this connector in details:

https://docs.microsoft.com/en-us/connectors/office365users/#user

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Users online (6,106)