Office 365 Activations in Microsoft Graph - microsoft-graph-api

I would like to get the office 365 activations for a user. I can go into the office 365 admin center and see the devices a user has activated. However, I cannot seem to find anywhere in the graph api where I can get at that data. I can run the reports and get totals for how many activations a user has, but I need to get the actual device names. Is this possible and what is the endpoint for it if it is?

Currently, it's not possible, you can however voice your interest in such a feature or support similar ones in the Microsoft Graph Feature Request Forum.
You may still use the Office 365 activations endpoints to get details like users who have activated Office 365, the count of Office 365 activations on desktops and devices, etc.

Related

Connecting PowerBI to Microsoft Graph or Azure AD

My customer needs to connect their users and groups within Office 365 & Azure AD to Power BI, so they can show a report of the amount of users with certain licenties, the amount of RDS users and what type mailbox the users are using.
The whole proces needs to go automatically, so when PowerBI is opened the data is already ready for them and up to date.
My solution was the following:
Source,Office 365 & Azure AD), send the data to an API(Microsoft Graph)
Microsoft Graph exposes a webendpoint which another application can get the data from, IF they provide the correct OAuth2 bearer token-.
Access the webendpoint with Power BI and get the data when Power BI get's opened.
PROBLEM
I don't know how to refresh an OAuth2 token in Power BI, can someone help me?
Connecting to Microsoft Graph REST APIs from Power Query isn't recommended or supported.
Read more here: https://learn.microsoft.com/en-us/power-query/connecting-to-graph

Microsoft Graph API: List sign in of users assigned any Dynamics license

I want to list sign in of users who are assigned any of the MS Dynamics licenses in order to get the usage report. As it looks the MS Dynamics license grants access to several apps and if any user is signing in any of that apps he/she is assumed to be effectively using the license.
Is there any way we can get the information using Graph API?
Thanks.
Thank you for reaching out, to my knowledge, there isn't currently a way to list signed in users using the Dynamics license with Graph API. M365 Usage Reports only show Dynamics 365 Customer Voice Activity not usage of apps using the license. You might want to use the Power Platform Admin Centre to manage Dynamics 365 apps.
Would you consider filing a feature request on the M365 Developer Platform so this can be looked into?
Let me know whether this helps and if you have further questions,

MS Graph - How do I list all users from specific OU under my DC?

I'm building a Logic App to list all users from MS Graph.
I can get the list of all users by calling MS Graph API using OAuth authentication in my Logic App but I'm struggling to apply a filter in my custom request in MS Graph.
i.e. I have below structure in my OnPremiseAD:
OU=Site1,OU=Users,OU=TEST,DC=xyz,DC=com
OU=Site2,OU=Users,OU=TEST,DC=xyz,DC=com
OU=Site3,OU=Users,OU=TEST,DC=xyz,DC=com
OU=Site4,OU=Users,OU=TEST,DC=xyz,DC=com
...and I want to list users from OU=Site4 only.
Can someone please help?
https://graph.microsoft.com/beta/users?$filter...???
Based on Custom OU considerations and limitations:
User accounts, groups, service accounts, and computer objects that
you create under custom OUs aren't available in your Azure AD tenant.
These objects don't show up using the Microsoft Graph API or in the
Azure AD UI; they're only available in your managed domain.
So I'm afraid that it's not supported to list the users under an OU via Microsoft Graph API.
See a similar post here.

Office 365 Admin : Audit MSGraph requests in Office365 Security & Compliance

As an exchange admin, I want to audit Graph API calls
Under Office 365 Security and Compliance section, Audit Log Search, I can find audit logs for other components such as Power BI but nothing for Graph.
I tried using Exchange Mailbox Activities but I don't see any audit logs when I access/update meeting items using Graph API.
Is there a way I can audit these calls?
To monitor the MSGraph app activities, you should check for 'Add OAuth2 Permission Grant' activity under Azure AD workload. But O365 Security & Compliance portal doesn't show the activities performed by Azure AD workload. 
As a workaround, you shall use the Search-UnifiedAuditLog cmdlet.
sample code snippet for getting last month data
Search-UnifiedAuditLog -StartDate 4/23/2019 -EndDate 5/23/2019 -Operations "AddOAuth2PermissionGrant"
If you would like to explore the activities using a GUI interface then you shall try the Office 365 auditing reports available in AdminDroid Office 365 Reporter.

How to determine the user's country code in Azure AD

I'm trying to determine the user's time zone in the BOT that I created. This Bot can be user worldwide and the only way for me to determine the user's timezone is to determine his country (because the channel that i user is skype and there isn't any information about the user's TZ unlike other channel's).
So is there a way to determine the client's country code in azure AD ?
Assuming you are having your users login to your bot with AAD, you could use the same token to access the user's profile via the Microsoft Graph API. The profile will give the users office location which you could then map to for a possible location. It won't account for a user who might be traveling but, it's an option.
You can read the Microsoft Graph docs to learn more and experiment using the Graph Explorer.
As I don't know which SDK or version you are using, if you visit the BotBuilder repo you can find links to samples on how to build a bot that uses OAuth and makes calls to Microsoft Graph.

Resources