Does Microsoft Graph API work with Office 365 family subscription? - azure

having an Office 365 family subscription, I'd like to use Microsoft Graph to query certain data from Outlook (events) and To-Do from within a web application.
Having had a look at the microsoft tutorials/quick start sessions, it seems that I have to register my application first to receive an access token.
Though, loggin in into Azure Portal with my personal Outlook account (with the O365 family subscription) I can not register an app/receive an token.
Am I missing something, or is Microsoft Graph only useable for business/educational subscriptions which are allowed to use Azure AD?
Thanks!

Based on the MICROSOFT DOCUMENTATION:-
Microsoft Azure Active Directory is free if your organisation has a
paid subscription to Microsoft 365, Microsoft Dynamics CRM Online,
Enterprise Mobility Suite, or other Microsoft services. Azure AD
allows you and other administrators to create and manage user and
group accounts.
For more information please refer this MS Q&A|Invalid grant error for free Office 365 Family & Personal/Free accounts.

Related

access onedrive from azure ML notebook script - 400 Client Error Tenant does not have a SPO license

im trying to access my onedrive from an azure ML script , both using same account ( though the azure one is personal while the onedrive one is work ) . The connection succeeds but then gives a 400 error...any idea why ? thanks
----------------
Authenticated!
Client Error: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/drive/root | Error Message: Tenant does not have a SPO license.
--------------
from O365 import Account
credentials = ('client id xxxx 6fb8a4', 'secret value xxxxx v6Hyoa2K')
account = Account(credentials,auth_flow_type='credentials',tenant_id='87xxxxx8-3db7f7',main_resource='myemail#email.com')
storage = account.storage()
if account.authenticate():
print('Authenticated!')
my_drive = storage.get_default_drive()
root_folder = my_drive.get_root_folder()
# iterate over the first 25 items on the root folder
for item in root_folder.get_items(limit=25):
if item.is_folder:
print(list(item.get_items(2))) # print the first two element on this folder.
Client Error: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/drive/root | Error Message: Tenant does not have a SPO license.
The error you are getting for that you need to notice the couple of things. Please check the points stated in this stackover flow reference which says,
Office 365, Azure Active Directory, EMS (Enterprise Mobility Suite), personal Outlook, personal OneDrive, and other Microsoft cloud services are all accessible through the developer portal or API known
as Microsoft Graph. The API is free to use, but in order to access the
data it hides, you must have those services, some of which may be free
and others of which you may have to pay for.
Regarding integrating Office 365 into your current tenant. I believe
you used a Microsoft Account to join up for Azure. For that tenant,
you can still buy or acquire Office 365. You may have to add a
new Azure AD user to your tenant (not a Microsoft Account) and give
them company admin privileges. Whether it asks if you already have a
tenant or account, login in with the AAD account you just generated.
You should then be able to sign up for Office 365. And there you have it an Azure AD tenant with both an Azure AND an Office 365
subscription.
Solution : You must be using an Office 365 Home license for you azure ad tenant. For SharePoint Online you need an Office 365 Business account .
You need a license that include all the OneDrive service (Operation). So, recommendation is Office 365 Business Essentials which is the cheapest and has Microsoft Graph functionality - more than just upload/manipulate Excel files in OneDrive in future.
So from the above conclusion, you can't use the Microsoft Graph API to access OneDrive data(read and upload) without having SharePoint Online (which only comes with the business licenses).
Reference:
SO thread by Allen Wu

MS Graph can't query for SharePoint data

I'm trying to query 365 SharePoint list data from MS Graph.
I've setup the app via portal.azure.com and I gave it application permissions to everything that is required for User, Mail, Sites and Groups. I gave it permissions on the MS Graph and SharePoint sections within the permissions.
I can query for Users and their calendar information but when it comes to Sites I get the following.
Image of Api response
We have the Azure AD Premium P1 subscription for Education.
I tried using the same tenant ID, Client ID and secret in Postman and I get similar results.
I tried to query for the same data via myself logged into Graph Explorer and I get the data I'm expecting.
How can I query for the data from SharePoint via the app credentials for all sites and all data in my tenant
Thank you.
Users may be unable to access multiple Microsoft 365 services, any service that leverages Azure Active Directory (AAD) may be affected. Microsoft is working on this issue actively.
Microsoft 365 Service health status

REST API to manage users on Sharepoint

As a follow-up question to REST API to manage users on skype for business, I would like to understand how the Sharepoint Server User API differs from MS Graph API for Users. The Graph documentation indicates that we could use it to manage Sharepoint users the same way we would Office 365 users. However, there are standalone Sharepoint installations (like versions e.g. 2007, 2010, etc.,) which don't fall under Office 365 plans.
The Graph API Docs linked above says the User resource represents an "Azure AD user account". However, the Sharepoint User doc says it represents a "user in Microsoft SharePoint Foundation." Are these users entirely different from each other?
All we're looking to do is manage users for our clients some of whom have subscriptions to Office 365 and some who just use standalone Sharepoint setup. We are not bothered about application specific features like Accessing the sharepoint files, sites or even managing Word documents, Excel sheets, etc., So, does the Graph API support managing users in such cases as well?
That API is only for SharePoint 2013+
The user management REST API linked in your question is specifically for SharePoint 2013, and presumably works in SharePoint 2016 as well. This is regardless of whether the SharePoint environment is on premises or in the cloud.
Office 365 is currently a subset of SharePoint 2013/2016 in terms features and functionality.
Note that SharePoint 2007 and 2010 will not have this API.
SharePoint users and Azure AD accounts are not synonymous
Consider that SharePoint and AD can exist independently of each other.
SharePoint does not need to use Azure Active Directory for authentication. It can use a traditional on-premises or cloud-hosted Active Directory, or theoretically (starting with version 2010) can use any claims-based authentication provider aside from Active Directory.
SharePoint 2007 and 2010 could also support simple forms based authentication as well as custom authentication providers, but as noted previously, neither of those versions of SharePoint expose the REST API in question.
AD = Authentication; SharePoint User = Authorization
Azure AD is a claim provider. A claim provider is used for authentication; when you log on to SharePoint, SharePoint relies on Active Directory to determine that you are who you say you are. A user's SharePoint account is used for authorization; the SharePoint account is granted access to content within SharePoint on a site by site basis.
Information in AD vs information in SharePoint
When using Azure AD for authentication, there are usually some areas of overlap between the data in SharePoint and the data in AD.
SharePoint's user profile service is usually set up to synchronize data from Active Directory to SharePoint, so that AD serves as the master data set for things like user display name and title. However, not all information is necessarily sync'd from AD to SharePoint, and additional information can be tacked on to SharePoint user profiles.
Group Membership in AD vs Group Membership in SharePoint
In Azure AD, a user can be a member of multiple groups. Groups can include both Active Directory groups (which can be nested) and Office 365 (SharePoint) groups (which cannot be nested).
A SharePoint user can only be a member of SharePoint groups, since SharePoint does not keep track of membership of Active Directory groups. That said, a user may have access to content in SharePoint indirectly due to an Active Directory group having been granted access.
AD User Scope vs SharePoint User Scope
Unless you're working directly with the user profile service, when you work with SharePoint users programmatically, they need to be retrieved from a specific site in SharePoint. This is because each site collection has its own set of groups which cannot be used on other site collections within the SharePoint farm, so group membership is tracked only on a site-by-site basis.
Note that this means that a user's lookup ID number (which is different from their login name) may vary between site collections. This also means that a user's collection of groups will vary depending on the site from which the user object was retrieved.
An Azure AD user has no such silos.

how to access Excel API through Graph Explorer with personal account

Trying to access the Excel Api using office 365 personal account through microsoft graph explorer. But it is not working. we tried this in graph explorer after login in with office 365 personal account
https://graph.microsoft.com/v1.0/me/drive/items
Please suggest how to get this working.
Excel REST API is not supported for consumer accounts at this point in time, but we do have this on our roadmap and hope to enable it soon.

Can we call Office 365 API from Linux machine?

We've developed our own cloud-based email solution on top of Linux. We're providing Admin Interface to clients where they can create, modify, delete users/groups. Few of our clients are using Office 365 service for few mailboxes. We would like to make an API call to office 365 whenever there is any activity performed (Create, modify, delete user, etc.) by clients on our admin panel for office 365 users.
If you're looking to interact with user accounts and mailboxes, you should be able to do most of what you want with Microsoft Graph via REST calls:
http://graph.microsoft.io/docs/api-reference/v1.0/resources/user
Also see the Office 365 API reference:
https://msdn.microsoft.com/en-us/office/office365/howto/rest-api-overview#sectionLanguagesIDEs

Resources