web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Other options to replc...
Power Apps
Answered

Other options to replce and get multipel values?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

we are working on a requirement to get a current login user license and sublicense app. 

Request:

Before going through here I request you to open the below link first to understand more about what azure License GRAPH API will return.

So we have two collections/Tables

1: userLicenses: Graph API values returning into a collection called "User Licenses" having the fields skupartNumberservicePlans 

2: LicenseNames: collection (loaded a predefined table) for friendly names. so we have to lookup and get friendly names for License and Sublicense.

 

muralikrishna12_0-1665921087229.png

servicePlans column(table) has nested column values.

muralikrishna12_0-1665925250534.png

 

skupartNumber: returns the License name, but it's not the Friendly name.

servicePlans: Its a kind of table when open it has a few columns, about SubLicense details

servicePlanName: It will return the user's Sublicense list. again this is not a Friendly name.

 

as I mentioned above, we created a collection (loaded a predefined table) for friendly names as per the link above.

so we have to look up and get friendly names for License and Sub-License names.

See the friendly table fields as well.

friendly name table.png

ProductDisplayName: is the field to License(skupartNumber) Friendly name.

servicePlaneFiendlyName: This is the Sub-License(servicePlanName) friendly name

to the gallery, we can load/get License value from graph API and we can lookup friendly names as well, using the below formula.

Gallery Items property: UserLicenses

License label :

 

LookUp(LicenseNames, StringId=ThisItem.skuPartNumber).ProductDisplayName

 

the above formula returns the expected value because of ThisItem.skuPartNumber direct field so we can lookup from LicenseNames table.

The issue begins here for the sublicense, here we have to load all the sub-license plans for the assigned License.

 

issue.png

if you see the above screenshots the "servicePlans" field is not a direct field value to get the list of sublicense.

yes, I understand the Sub-License plan list is not a single value to return as it is multiple sub-license values.

Any assistance please to get the list of 

 

the workaround I find two solutions but those are returning only Sub-License values using the sub-License I am not able to look up the friendly names. 

workaround -1

 

Left(Concat(LookUp(UserLicenses,skuPartNumber = ThisItem.skuPartNumber).servicePlans,servicePlanName & Char (10)),
Len(Concat(LookUp(UserLicenses,skuPartNumber = ThisItem.skuPartNumber).servicePlans,servicePlanName & Char (10)))-2)

 

alternate1.png

In-Fact this is the expected output, but not able to get Friendly names for this Sublicense.

Workaround-2

 

LookUp(LicenseNames, ServicePlanName= First(LookUp(UserLicenses, skuPartNumber = ThisItem.skuPartNumber).servicePlans).servicePlanName).ServicePlansFriendlyName

 

alternate2.png

in-fact this is not the expected output, because it returns only the first sub-license not the complete list of License Sub-License list. but I can get the friendly name for this sub-license.

here, is there any way to use the workaround-1 solution and use the lookup for friendly names to get all the sub-license lists to the respective License?

Please assist me. your reply would be really appreciated

 

I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try:

    Concat(
     ForAll(
     LookUp(UserLicenses, skuPartNumber = ThisItem.skuPartNumber).servicePlans As TableA,
     LookUp(LicenseNames,ServicePlanName=TableA[@servicePlanName]).ServicePlansFriendlyName
     ),
     Value,
     Char(10)
    )

     

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Really Appreciate it,
    Thank you very much it's working as expected. I will accept your solution 

    before closing this thread

     

    But one more little thing is pending. hence you understand my query. 

    that is Sub-license Status, would like to display in toggle,

    This means that every sub-license has a status that shows it is enabled or not, so we would display this status in a toggle,

    Is there any way to display every sublicense to associate toggle controle?

    how the Sublicense string is been displayed and is separated in each sub License in a new line
    the toggle control needs to auto-generate to each SubLicense.

    ex.

    muralikrishna12_0-1665999875203.png

    muralikrishna12_1-1666000918790.png

    Here I can one or many but it has to get an added number of Sub-License. 

     

    Can you please assist me is there any way to generate dynamic control opposite to the Sub-License?

    Because UserLicense, servicePlane Table has ProvisioningStatus field which will display Yes/No status.

     

    Kindly assist me if there is any way to display dynamically based on the Sub-License. 

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    HI @v-bofeng-msft 
    using this same formula, can you assist me to filter the Sub-Licence text?

    Because there is a common Sublicense that is displayed in every Sub-License.

    We would like to apply a filter on that Sub-License.

     

    Example

    ServicePlanName = TableA[@servicePlanName] && !(ServicePlanName ="Exchange Foundation")
    Or 
    ServicePlanName = TableA[@servicePlanName] && ServicePlanName <> "Exchange Foundation"

    but no luck, if I am correct we may need to apply a filter on the table data where it's getting
    Please assist me how can i apply Filter on Sub- License part

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous , 

     

    The formula you provided looks fine

    vbofengmsft_0-1666080064808.png

     

    I'm not sure what the reason is that it is not working, maybe you can try "disambiguation"

     

    Concat(
     ForAll(
     LookUp(UserLicenses, skuPartNumber = ThisItem.skuPartNumber).servicePlans As TableA,
     LookUp(LicenseNames,ServicePlanName=TableA[@servicePlanName] && !(LicenseNames[@ServicePlanName] ="Exchange Foundation")).ServicePlansFriendlyName
     ),
     Value,
     Char(10)
    )

     

    Best Regards,

    Bof

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Instead of the friendly name we need to add that direct table value from Graph API than

    it's working like the below.

    !(LicenseNames[@ServicePlanName] = "EXCHANGE_S_FOUNDATION")

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard