cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
waya01
Level: Powered On

AzureAD connector search by attribute

Hi,

 

I'm looking to build a Powerapp which searches for user based on a scanned Mifare card.  I have the card numbers in a custom attribute in our AD which is synced into Azure AD.  I was looking at using the AzureAD connector to run AzureAD.GetUser when they scan the card, but can't see how to search for user based on anything other than id.  Can I search based on another attribute?

 

Thanks,

 

Andy

7 REPLIES 7
Community Support Team
Community Support Team

Re: AzureAD connector search by attribute

Hi @waya01,

 

Did you mean that you are using the Office365 Users connector? If so, not all the attribute could be used in PowerApps. Here you could find the list of available user profile properties to be searched in PowerApps:

https://powerapps.microsoft.com/en-us/tutorials/connection-office365-users/

 

SearchUser

Search for users: Retrieves search results of user profiles

Input properties

Name Data Type Required Description
searchTerm string no Search string. Applies to: display name, given name, surname, mail, mail nickname, and user principal name

Output properties

Property Name Type Description
Department string Department of the user.
DisplayName string Display name of user.
GivenName string Given name of user.
Id string User id
JobTitle string Job Title of the user.
Mail string Email id of user.
MailNickname string Nickname of user.
Surname string Surname of user.
TelephoneNumber string Telephone number of user.
UserPrincipalName string User Principal Name.
AccountEnabled boolean Account enabled flag.

 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
waya01
Level: Powered On

Re: AzureAD connector search by attribute

Hi,

 

I looked at the Offce365 Users connector but saw it only could look up particular attributes that I wouldn't want to have the card numbers in.  I was hoping the AzureAD connector would be a bit more flexible.

 

Thanks,

 

Andy

Community Support Team
Community Support Team

Re: AzureAD connector search by attribute

Hi @waya01,

 

Sorry for the limitation, you could post this idea in the PowerApps Ideas forum, so it might be considered for future releases.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona Li

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
sgates
Level: Powered On

Re: AzureAD connector search by attribute

I wound up having to use a custom connector which returned results from an Azure API call that included a lot of additional user properties. The downfall is that you'd have different values to search users on and then parse through those results using your custom I'd.

I can share the process if you'd like.
WillPage
Level 8

Re: AzureAD connector search by attribute

@sgates Can you please share?

I have exactly this challenge; a new user request form where I want to validate a MiFare card code is not already in use by looking up against an Exchange custom attribute.

ngeorgeault
Level: Powered On

Re: AzureAD connector search by attribute

Custom connector can be an option but since Feb19 you will have to pay a P1 in order to use this connectors.

We need to get a solution from the default AzureAD connector. It does NOT make any sense to ask customer to pay a P1 in PowerApps to access a data that is stored in a Active Directory you already paid for. Cause you have to pay for a AAD P2 to got the Add custom extension attributes feature in AAD Smiley Sad

WillPage
Level 8

Re: AzureAD connector search by attribute

@ngeorgeaultI found a workaround to this issue. Hit the Graph API using the HTTP conector in Logic Apps, parse the JSON to get your dynamic content then populate a data source you don't need a premium license for, like SPO or Azure SQL to consume in PowerApps.

 

Set the trigger for your Logic App either on a schedule if your directory deosn't change much, or you can set the trigger to be an HTTP Post, then trigger it from PowerApps by creating a PowerShell Azure Automation runbook that's basically Invoke-Webrequest -Uri {parameter} -Method Post and use the Azure Automation connector to create a RunBook job and pass the parameter (being the trigger URL from LogicApps). You can use the same RunBook to trigger multiple Logic Apps because the URI is a parameter. Do a few test runs, see how long it takes to run your Runbook and Logic App then set a timer that starts after you trigger the Runbook and ends when you expect the whole process to have finished and refresh the data source on Timer End.

 

TBH if you're only deploying the app to a couple or three people you're better off buying the license than going through all that, but different story as you scale up.

 

If you are at scale though, don't have every user triggering a LA run each time they run the app or you'll get weird results and the LA runs might just about cost you more than the Plan 1 license.

 

If anyone from MSFT is reading this, please don't make this workaround a premium feature too. Please.