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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How i can get the Prin...
Power Automate
Unanswered

How i can get the Principle ID of an Office 365 security group

(0) ShareShare
ReportReport
Posted on by 1,811 Super User 2024 Season 1

I have an Office 365 security group (without email), and i want to add it to an Item permission, where the built-in action "Grant access to item or folder" will not work, as it only accept email addresses inside the Recipients list.

 

 

so i need to send an http request to SharePoint, as follow:-

 

 

johnjohnPter_1-1698921354933.png

 

 

 

but for that i will need to know the PrincipleID of the group, the PrincipleId is the group id inside SharePoint site and not the group id inside office 365 ,, is there  way to get this Principle id? i can get it from the UI, as follow (which is 14):-

 

johnjohnPter_0-1698921290971.png

 

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @johnjohnPter,

     

    You can retrieve the principalId value by using the SiteUsers collection (which also includes security group objects) and use the GetByLogin method for this.


    Below is an example

     

    _api/web/SiteUsers/GetByLoginName('c:0t.c|tenant|@{variables('EntraGroupId')}')/Id

     

    retrievesecuritygroup_principalid.png

  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at

    @Expiscornovus ok thanks, worked well 

     
     
     
     
     
     
     
     
     
     
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard