How is the API version done for https://graph.windows.net - azure-active-directory

How is the versioning done for https://graph.windows.net and https://graph.windows.net/$tenantdomain/activities
I see the https://graph.windows.net/ has versions [latest is 1.6] ref: https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-graph-api-versioning#2013-11-08
but https://graph.windows.net/$tenantdomain/activities is still referred as beta version. The same holds good for /reports as well[https://graph.windows.net/$tenantdomain/reports].
Kindly let me know the difference in version of the above mentioned APIs
Thanks
Karthick

graph.windows.net is the older Azure Active Directory Graph API. graph.microsoft.com is the newer Microsoft Graph API.
I don't think that they will be making updates to the AAD Graph API, it seems all new development is focused on the MS Graph API. You can find documentation about it on https://graph.microsoft.io.
But even though, there doesn't seem to be an equivalent to the activities API in the MS Graph API.

Related

Is it possible to get the Watson agent version associated with a given workspace_id?

I am using v1 of the Watson API. It's possible I am missing something in the documentation, but I can't see to figure out how to determine the version of an agent for a given workspace_id.
I'm interested in doing this so that I can log the Watson response server-side, with the associated agent version, which changes as the agent evolves and new content is added.
It turns out that the concept of Watson assistant versions is only supported by the Watson V2 API. Additionally, that API does not presently expose the current version of the assistant being called.

Configuration of React app, .NET Core 3.1 API, and calls to Microsoft Graph

Is there a "best" way of achieving this?
Basically I want to leverage my company's Azure AD tenant to build a fully featured internal application. Using Microsoft Graph, I can retrieve users via their identifier guids, and use the identifiers as foreign keys for various tables in our on premises database, instead of having a dedicated User table, which would need to be populated and synced up with the AD. There are many other prospective uses for Graph, but leveraging users is the priority right now.
A large chunk of my application is built already. I am able to lock down my client app using the package react-aad-msal, requiring users to authenticate through single-sign-on. I have also successfully been able to pass that token back to the protected .NET Core API, accessing various endpoints as the authenticated user.
From here, I am not sure how I can develop the calls to Microsoft Graph. At which point should I make the connection? Should the client application connect to both the on-prem API, as well as Graph? Or should it only connect to the on-prem, which would then connect to Graph? Curious to know the pros and cons of either method.
I've also heard tell that Microsoft is working on their own package: #azure/msal-react, and that react-aad-msal should no longer be used (as it only supports msal 1.0 and not 2.0. I have no idea which version is better for my needs). While msal-react is still in development, apparently I should be using #azure/msal-browser. But I cannot find a good example of a react app using msal-browser to authenticate.
Here is a Sample on how to use MSAL with React to call Microsoft Graph.
The only different in your case will be that instead of calling Microsoft Graph, you will call your own API.
Bottomline is - there is no direct integration package yet for react. Which can also be read from the official statement on the msal-js repo:
After our current libraries are up to standards, we will begin
balancing new feature requests, with new platforms such as react and
node.js.
You can also use .net core instead. Please go through the sample here which can help.

MSAL vs msgraph-sdk-java-auth

I want to develop a Java Web App to consume some Microsoft Graph Services. According to Azure Portal's "Quick Start" tab, they recommend MSAL to authenticate and call the services (com.microsoft.aad.msal4j.*).
On the other hand, I've found https://github.com/microsoftgraph/msgraph-sdk-java-auth, which offers a nice API to use the services, but the last uptade is from more than a year.
Which should I use? I'm a bit afraid the SDK gets deprecated.
Thanks.
If you have a look at the dotnet version of this library, you'll see it uses MSAL. Whenever the Java msgraph auth library was started, MSAL Java wasn't ready. There's work that needs to be done to align the Java auth library with the dotnet one so it uses MSAL as well. I'd say go ahead and use the Java auth library keeping in mind a few things:
It will change as the required work gets done
Auth libraries for msgraph SDKs are all in preview and might change in the future
There's currently a limitation addressed by this pull request and that you can workaround as documented here

User authentication through Office365

We're are about to build a new intranet system for our company, leaving SharePoint behind. The system will be built using Ruby on Rails. Since we're using Office365 for mail, calendar etc., we would like to authenticate our intranet users through Office365.
I'm aware of Microsoft Graph API, but I have a hard time figuring out of there is a possibility to authenticate users from a third-party application. Moreover, we would like to retrieve general information about the user, like profile picture and calendar information.
Is anybody knowledgeable about Microsoft Graph API and know if it's possible to achieve our goals using the API?
You're on the right track. You would authenticate with Azure AD, which is in the 365 ecosystem.
I wrote (and answered) a detailed guide here:
How to get the JWT (using OpenIdConnect) from HttpContext, and pass to Azure AD Graph API
Note that this is the OpenIdConnect flow. I think the Saml2 flow is somewhat different.
Don't take my advice on storing the authentication codes or try to acquire the token silently - it ended up causing issues in production that weren't seen in test. Rather, just use the user object id as your key attribute.
The microsoft documentation on the topic is a little cerebral and abstract, so it'll take a little head scratching, but have a look at the samples mentioned in the post I linked above, they'll get you started.
Yes, using Microsoft Graph is the right way to go about achieving the stated goals here.
There are quiet a few samples and tutorials provided on the Microsoft identity platform code samples page that will teach how to build an app that calls Microsoft Graph.

ms graph beta endpoint, many apis do not support app permissions

many endpoints in the MS Graph beta API do not support the application permission type, meaning they can only be invoked under a user identity. I would like to have a headless service/daemon running that operates under its own app identity, and is able to do stuff with the graph API
For example remote locking a managed device.
I would like to know, if MS plans to add this feature in the near future.
I recommend visiting the UserVoice and adding your suggestions.

Resources