Power Fx function
Office365Users.SearchUserV2 — Power Fx function reference
Search the directory.
Syntax
powerfx
Office365Users.SearchUserV2( { searchTerm: Text [, top: Number ] } ).valueExamples
powerfx
Office365Users.SearchUserV2({searchTerm: txtFind.Text}).value→ Matching users
powerfx
ClearCollect(colResults, Office365Users.SearchUserV2({searchTerm: txtFind.Text, top: 10}).value)powerfx
ForAll(Office365Users.SearchUserV2({searchTerm: "Contoso"}).value, Collect(colStaff, {Name: displayName, Email: mail}))Common mistakes & gotchas
- The result table is nested under a .value property — calling SearchUserV2(...) alone returns a wrapper record, not the table of users directly.
- searchTerm matches with prefix-style matching against display name, email, and a few other directory fields, not full free-text search — a short or mid-name partial term may return no results.
Related Power Fx functions
From Connectors (real patterns)