Showing posts with label Azure. Show all posts
Showing posts with label Azure. Show all posts

Friday, May 13, 2022

Power Automate: Get Azure Active Directory Group Users

Hello Friends.

Welcome back with another post on Power Automate. Today, we will learn about How to get users from Azure Active Directory Group through Power Automate. Sometimes, there are the requirements that we need to send mails to some users that belongs to a particular AD group. Therefore, our approach will first to get all the users from that AD group and then perform activity (like sending email) as per the application requirement. Let's start.

  1. Create a blank "Instant cloud flow" with trigger as "Manually trigger a flow". Give it a name - ExtractADGroupUsers.
  2. Now, we need the ID of that AD Group for which, users need to extract. You may ask this ID either from the AD Admin or you can add that group in your SharePoint site and then click on that group, it's account filed will give you the ID of that group. The GUID after the "tenant|" is the ID of the group.
  3. Now, go back to the flow and add an action "List group members" under "Office 365 Groups" category.
  4. It will ask the Group ID. Input the ID we had copied from SharePoint discussed above.
  5. Save it and Test it.
  6. It will give us a JSON of all the users belong to this group. The attribute, which is important for us is "mail" and then "displayname". The primary is "mail".
  7. Now, edit the flow again and initialize an array, in which you need to store the Email IDs.
  8. Now, we need to use an "Apply to each" action to capture the EmailIDs and store in array. During this process, we will also check that EMail ID must not be null.
  9. That's all.
  10. If you wish to see, what all email ids have been captured, you may initialize another array and assign it with arrayGroupUserEMails array.
  11. Now Test the flow.
  12. As you can see from above screenshots, the flow ran successfully and we have extracted users belongs to the group.
  13. This is the shortest and straight way to perform the activity.
  14. However, there can be other ways as well to perform the same activity like-
  15. First- use the Select action to get the Emails only
  16. Then use "Apply to each" action to add emails in array.
  17. Second- use the "Filter" action to filter out null emails items.
  18. Then use "Apply to each" action to add emails in array.
  19. However, the results would remain same in all the cases.
With this, I am concluding this post.
Happy Coding !!!
Will see you again with some new topics.
Stay Safe !
Stay Healthy !

Friday, October 22, 2021

Azure: App Registration

 Hello Friends,

Welcome back with some new topics. Today, we will discuss about Azure. Most of the times, we have to perform App Registration on Azure. Let's see, how do we do it?

  1. Login to Azure Portal. If you don't have account, you may create a trial account for 30 days with some credits for paid services.
  2. Then click on Hamburger icon at top left corner.
  3. Scroll down the list and you will get a link of "Azure Active Directory". click on this link.
  4. It will open the overview of Azure Active Directory. Here, click on + Add V link. It will show a drop down where the last option is App registration.
  5. Click on this option. It will take you to app registration page. Provide the name of the app and select the accounts type that will be having access to it.
  6. Click on Register button. It will take couple of seconds to get it registered and will show the information about Client ID, Object ID, Tenant ID etc.
  7. You may click on Endpoints link to get the URLs of various endpoints.
  8. This way you can register the app.
With this, I am concluding this post.
Happy Coding !!!
Will see you again with some new topics.

Stay Safe !
Stay Healthy !