Connecting to MS Office 365 Graph API through  on-premise SSIS

%3CLINGO-SUB%20id%3D%22lingo-sub-1648269%22%20slang%3D%22en-US%22%3EConnecting%20to%20MS%20Office%20365%20Graph%20API%20through%26nbsp%3B%20on-premise%20SSIS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1648269%22%20slang%3D%22en-US%22%3E%3CP%3ENeed%20help%20connecting%20to%20MS%20Office%20365%20Graph%20API%20through%26nbsp%3B%20on-premise%20SSIS.%20Standard%20SSIS%20components%20don't%20work%20due%20to%20authentication%20(need%20OAuth%202.0)%3C%2FP%3E%3CP%3EI%20do%20have%20a%20code%20from%20Power%20BI%20(M%20Query)%20that%20works%2C%20so%20most%20probably%20need%20an%20equivalent%20in%20C%23.%3C%2FP%3E%3CP%3E%22%20%3D%20()%20as%20text%20%3D%26gt%3B%20let%20Source%20%3D%20Json.Document(Web.Contents(%22%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2F%3C%2FA%3E%22%20%26amp%3B%20%23%22Tenant%20Id%22%20%26amp%3B%20%22%2Foauth2%2Ftoken%22%2C%20%5BContent%20%3D%20Text.ToBinary(%22client_id%3D%22%20%26amp%3B%20%23%22Client%20Id%22%20%26amp%3B%20%22%26amp%3Bresource%3Dhttps%253A%252F%252Fgraph.microsoft.com%22%20%26amp%3B%20%22%26amp%3Bclient_secret%3D%22%20%26amp%3B%20%23%22Client%20Secret%22%20%26amp%3B%20%22%26amp%3Bgrant_type%3Dclient_credentials%22)%20%2CHeaders%3D%5B%23%22Content-Type%22%3D%22application%2Fx-www-form-urlencoded%22%2C%20Accept%3D%22application%2Fjson%22%5D%5D))%2C%20access_token%20%3D%20Source%5Baccess_token%5D%20in%20access_token%20%22%20%23%22Tenant%20Id%22%2C%20%23%22Client%20Id%22%2C%20%23%22Client%20Secret%22%20are%20parameters%20that%20I%20am%20planning%20to%20pass.%3C%2FP%3E%3CP%3EWhat%20and%20how%20should%20be%20used%20in%20SSIS%3F%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%20class%3D%22%22%3EDovil%C4%97%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Visitor

Need help connecting to MS Office 365 Graph API through  on-premise SSIS. Standard SSIS components don't work due to authentication (need OAuth 2.0)

I do have a code from Power BI (M Query) that works, so most probably need an equivalent in C#.

" = () as text => let Source = Json.Document(Web.Contents("https://login.microsoftonline.com/" & #"Tenant Id" & "/oauth2/token", [Content = Text.ToBinary("client_id=" & #"Client Id" & "&resource=https%3A%2F%2Fgraph.microsoft.com" & "&client_secret=" & #"Client Secret" & "&grant_type=client_credentials") ,Headers=[#"Content-Type"="application/x-www-form-urlencoded", Accept="application/json"]])), access_token = Source[access_token] in access_token " #"Tenant Id", #"Client Id", #"Client Secret" are parameters that I am planning to pass.

What and how should be used in SSIS?

Thank you,

Dovilė

0 Replies