4. From the left menu, click “Azure Active Directory”. 5. Click “App registrations”. 6. Click “New registration”. 7. Provide the application name, supported account type and leave the Redirect URI blank. 8. Click Register. 9. Note down Application and Directory IDs to use later in the flow. 10. From the left menu, click “API permissions” to grant some permissions to the application. 11. Click “+ Add a permission”. 12. Select “Microsoft Graph”. 13. Select Application permissions. 14. Grant the needed permissions (Please refer table below for example). 15. Click “Add permissions”. Below are examples of the needed application permissions to perform the operations. Action Application permissions List owners Group.Read.All, User.Read.All, Group.Read.All, and User.ReadWrite.All Add member GroupMember.ReadWrite.All, Group.ReadWrite.All, and Directory.ReadWrite.All
Action
Application permissions
List owners
Group.Read.All, User.Read.All, Group.Read.All, and User.ReadWrite.All
Add member
GroupMember.ReadWrite.All, Group.ReadWrite.All, and Directory.ReadWrite.All
2. From the left menu, click “Certificates & secrets”. 3. Under “Client secrets”, click “+ New client secret”. 4. Provide a description and select an expiry time for the secret. 5. Click “Add”. 6. Make a note of the secret value.
4. In the modal dialog, specify the flow name (e.g. Get Group Owners). 5. Select the trigger as “When an HTTP request is received”. 6. Click Create. 7. The flow should get created as below. 8. Expand the activity “When a HTTP request is received”. 9. Click “Generate from sample”. 10. In the popup, add the below request body JSON schema. { "groupId":"07c00c4d-6a21-4c51-9545-f2921b4109b0" } 11. Click Done. 12. The request body json schema will be generated as below. 13. Initialize the variables client id, directory (tenant) id and secret generated from the previous step. These variables then can be used to make an MS Graph API call. 14. Add the “HTTP” activity.
{
"groupId"
:
"07c00c4d-6a21-4c51-9545-f2921b4109b0"
}
5. Click Send. 6. Observe the run history of the flow.