cancel
Showing results for 
Search instead for 
Did you mean: 

Add Office 365 graph API

Hi, 

 

I think it would be very usefull to have access to the office 365 graph API.

It would natively allow for groups classification based on some metadata that would be stored in MCDM.

For instance we have groups per organisational team, per project team, per client, and in same case, a team has 2 groups (one public and one private). Building an app to help people to identify the group they are looking for requires access to groups API which is included in the graph API.

Status: Planned

@SameerCh to follow up on this.

Comments
Power Automate Staff

Thanks for the idea!  This is something we are planning on.  The graph API does provide access to lot of entities, and we are looking at providing a first class experience around this.

 

If you have an immediate need to access office groups in PowerApps, a custom API is great way here as well.

 

Level: Power Up
Using custom API requires building the swagger.json file for the API and I have not been able to find any for office groups. 😞 Building the file seems to be a lot of work... Maybe I'm wrong.
Power Automate Staff
Status changed to: Planned

Adding @archanan to confirm status pls.

Level: Power Up

I treid but some how my graph api connection is not getting authenticated in powerapp. Not sure if swager file has issue..I agree there should be a sample swager file..

 

Sign In


Sorry, but we’re having trouble signing you in.
We received a bad request.

Additional technical information:
Correlation ID: ca44fd1c-b89b-418d-b320-2a07b38cXXXX
Timestamp: 2017-03-22 16:06:26Z
AADSTS70001: Application with identifier '475986ce-faf8-43e4-8ba4-4cae02c8XXXX' was not found in the directory e600ad84-320a-43ef-bfa4-XXXXXXXXXX
 

Please advise or post if anyone have good sample of Swager file?

PowerApps Staff
Status changed to: Planned

@SameerCh to follow up on this.

Power Automate Staff

The error says that the app you are uisng ('475986ce-faf8-43e4-8ba4-4cae02c8XXXX') is not in the directory/tenant that you are using to sign in (e600ad84-320a-43ef-bfa4-XXXXXXXXXX).

 

 

Level: Power Up

Hi Sameer,

 

Thanks for your quick reply. I used following link to create connection and used sample swagger file from the article and not sure whare it is picking that info as swagger file dont have mention of app.

 

https://powerapps.microsoft.com/en-us/tutorials/customapi-azure-resource-manager-tutorial/

 

AzureResourceManager.json

 

Please point me in right direction how it relate to app using swagger file or where  have to add my app info.

 

 

Power Automate Staff

Hi

 

The swagger file will probably not have that info.  Here are the things you need to do:

(1) Get your app registered in Azure Active Directory.  You can follow the steps from the tutorial above to do that.  Just make sure that in Step 10, you are asking for the right delegation scopes.  For Microsoft Graph, you select the appropriate scopes based on what API you want to call as defined here: https://developer.microsoft.com/en-us/graph/docs/authorization/permission_scopes

 

(2) Author the swagger corresponding to the API you want to call.  The swagger definition describes the API endpoint you want to invoke. You can do this by hand, or any other tools.  In the tutorial link above, the same swagger definition is for the Azure Resource Management (ARM) API, which is different from Microsoft Graph.

 

The good news is, you can now use a Postman Collection to do as well.  Blog post here gives details.

https://ms.flow.microsoft.com/en-us/blog/new-updates-custom-api/

 

We also allow you to author and test your Custom API.  We would recommend you use Microsoft Flow as the experience is better there -- but dont worry, you can use the API in PowerApps as well.

 

(3) When you register the custom API, you select the security details.  For Microsoft Graph, specify as follows:

Authentication Type: OAUTH 2.0

Identity Provider: Azure Active Directory

Client ID: <<some-guid-for-your-aad-app>>

Client Secret: <<from-your-app>>

Resource URI: https://graph.microsoft.com/

 

That should get you going.  BTW, I think we should use the Forum link to ask specific toubleshooting questions, you will find more help here.

Level: Power Up

Thank you so much for your help and detailed information. I will try and let you know? Thanks for your tip to get more attention on approperiate forum, i will keep in mind.

Level: Power Up

Another place where I would find this useful is cancelling an appointment via the graph API when an appointment is closed in CRM.