1
votes

I have a shared calendar in Office 365 with read and write permissions and I am trying to get it using Get calendar (V2) connector but it is only getting my own calendar. Is there a way to get shared calendars for Office 365 in Azure logic apps?

1
Hi Ayaz, please refer to the solution I provided below. If it helps, please accept it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in)Hury Shen
Hi Ayaz, I found one of the screenshots has something wrong. I have update it, please check my solution. If it helps your problem, please accept it as answer, thanks~Hury Shen

1 Answers

0
votes

For this problem I did some test and it seems the "Get calendar (V2)" action in logic app can't get the calendars which others shared to you. But I provide another solution(use graph api) below for your reference:

1. You need to ask others to share a calendar to you on office 365 web page but not in outlook app. enter image description here enter image description here

2. Then you need to create an application in your azure AD, please refer to this tutorial.

In the application you created in azure ad above, please do the steps below: enter image description here enter image description here

After that, please do not forget click the "Grant admin consent for xxx" button(Maybe you need to wait a few minutes until this button become clickable). enter image description here

Then click "Certificates & secrets" in your application in azure ad and new a client secret.(copy this client secret to your note book) enter image description here

3. Then create a "HTTP" action in your logic app and refer to the screenshot below to request for the access token.

enter image description here

The "client_id" is your appliction id in azure ad, "username" and "password" is your azure user name and password, the "client_secret" is what you got above. This "HTTP" action will help us to get the access token. The response should be like below: enter image description here

Then we need to parse the response data in json type, you can use "Parse JSON" action. enter image description here

Use the "Body" from the "HTTP" action and fill in the "Schema" box with the code below:

{
    "properties": {
        "access_token": {
            "type": "string"
        },
        "expires_in": {
            "type": "integer"
        },
        "ext_expires_in": {
            "type": "integer"
        },
        "scope": {
            "type": "string"
        },
        "token_type": {
            "type": "string"
        }
    },
    "type": "object"
}

4. After that, we can create another "HTTP" action in logic app and request the graph api for all of the calendars which you can see (please note there is a space between the "Bearer" and the "access_token"). enter image description here

5. At last, we can get all of the calendars in the second "HTTP" action's "OUTPUTS" box. enter image description here

Hope it helps~