Can you access Company Profile information through Graph - microsoft-graph-api

I was looking at a setting from Get-MSOLCompanyInformation - hoping to get the company's ReleaseTrack through an API.
I am somewhat guessing this would be part of the company "State" from the Get-MSOLCompanyInformation documentation, but I don't really see any graph-scopes that seem applicable
Anyone know which permission and endpoint I would query for that value?

The nearest similar MS Graph API for Get-MSOLCompanyInformation cmdlet would be organizations resource type.
Sample Request:
https://graph.microsoft.com/beta/organization

Use "Get-MgOrganization" Cmdlet
Reference:
https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.directorymanagement/get-mgorganization?view=graph-powershell-beta

Related

Issues With Twitter API V2 Elevated Access and has:geo Query Parameter

I have Elevated access to the Twitter API V2, and I am working with the API in Postman to search for recent Tweets containing a keyword. Iā€™d like to be able to add a further query parameter to only return Tweets that have a geolocation associated with them. To do this, I am adding the has:geo parameter, as shown in the below URL call:
https://api.twitter.com/2/tweets/search/recent?query=dogs lang:en -is:retweet has:geo
However, this is returning with the following error:
There were errors processing your request: Reference to invalid operator 'has:geo'. Operator is not available in current product or product packaging. Please refer to complete available operator list at https://developer.twitter.com/en/docs/twitter-api/enterprise/rules-and-filtering/operators-by-product.
From my understanding, of this page in the documentation, the has:geo search operator is only available to accounts with Elevated Access to the V2 API (which I have).
If anyone has any suggestions of how I can get around this issue, that would be much appreciated please.
If you check the detail on that page, it further explains:
Twitter API v2
- **Essential**: Available when using any Project
- **Elevated**: Available when using a Project with *Academic Research access*
I agree that it is not sufficiently clear on that page, unless you re-read it (because "Elevated" and "Academic Research" are technically different access levels for your account).
The answer is that in order to use that search operator, you would need to have Academic Research access, not just Elevated access.

Get all TI Indicators returns an empty list

I am trying to collect all active TIs via the Beta Graph API by following this. But it doesn't return anything. Here is what I use in Postman:
https://graph.microsoft.com/beta/security/tiIndicators
Response (200):
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#security/tiIndicators",
"value": []
}
A bit of context for the environment I work in.
The tenant has multiple Sentinel workspaces & resource groups.
The application I use has the correct permissions:
ThreatIndicators.Read.All
ThreatIndicators.ReadWrite.OwnedBy
ThreatSubmission.Read.All
ThreatSubmission.ReadWrite.All
It is my current belief that this might be due to the limitations of the Beta API. My reasoning is that accourding to this documentation you need the ThreatIndicators.ReadWrite.OwnedBy permission to access the API. This would suggest that currently you can only view TI's that the resource itself created.
If more info is needed just ask.
According to the documentation, ThreatIndicators.ReadWrite.OwnedBy permission allow you to manage threat indicators your app creates or owns.
If you want to read all the threat indicators for your organization then your app needs ThreatIndicators.Read.All permission.
Although this is not a solution to the question it is a workaround. By using the Log Analytics API you can get the TI via a KQL.
ThreatIntelligenceIndicator
| where ExpirationDateTime > now() and
NetworkIP matches regex #"^(?:(?:25[0-5]|(?:2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$" and
ConfidenceScore > 25
| summarize by NetworkIP
This is probably better as you can also use a watchlist to exclude specific IP addresses with one request.
One thing I struggled with this was Authorization. You must give your Application permission to use the api.loganalytics.io API, and the application needs the Log Analytics Reader role in the Log Analytic workspace you want to use.

MIME type not supported on Azure Data Factory ODATA

I decorated my Controller class with [Produces("application/json")] to enforce JSON output, but did not help.
Did you find a solution to this issue? I get the same error with the same scenario, but intermittently. The user however get the same error consistently.
How to handle not supported MIME type on azure datactory?
According my experience and I searched a lot, we can't find any solutions to solve the problem. I'm afraid we can't answer you.
So I suggest that you can call the Azure Support for help , maybe they could some more effective suggestions or solution.
You could follow these steps On Portal:
New support request:
Fill the details about you problem:
Then create the request, Azure Support will email or call you later.
Hope this helps.
Thanks Leon. I was able to resolve the issue. My ODATA API (Multi-Tenant App) was in a different Tenant and the Data Factory was in a different Tenant. In my API, the ValidateIssuers was set to true and the ValidIssuers was assigned correctly - array of valid tenants. Even then this was breaking it. I set the ValidateIssuers to false and wrote my custom logic to validate the issuers. This pretty much fixed it. There was another error related to the Audience. The AAD resource property in the Data Factory Linked Service (Connection) should match the ODATA Api AD applications Application ID URI ā€“ it is case sensitive. In all these scenarios, the error was always the MIME error which was throwing me off ā€“ completely misleading. I had to do some logging in my ODATA Api to get to the actual issue.

Count of user/members from group azure AD using graph API

I need to take a count of each group from Azure AD using Graph API. Can anyone tell me how to achieve it
I also faced the similar issue. When I ran the end point mentioned in https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http#example-2-get-only-a-count-of-all-membership I got "$count is not currently supported."
However, if you notice the documentation clearly, it asks us to send in the ConsistencyLevel as eventual in the REST header. I got the correct response when I sent the header along with the call:
GET https://graph.microsoft.com/v1.0/groups/{id}/members/$count ConsistencyLevel: eventual
There is currently no Microsoft Graph endpoint to get the number of users.
You could list members by using:
GET https://graph.microsoft.com/v1.0/groups/{id}/members
And then handle the count of the members in your code.
See the reference here. Try it quickly with Microsoft Graph Explorer.

Endpoint nodes list in Kaa

I want to get list of endpoints in Kaa, I see many REST functions here but all of them need informations like Endpoint Hash Key and ... but I don't know how I can find them. Anybody can help me how I can do this ? and is there a way for geting event on device discovery in Kaa ?
Thanks in advance
On your link for each Rest call, there is the description with the endpoint cresponding to the request. For example:
Get user authentication status
URL : /kaaAdmin/rest/api/auth/checkAuth
Same for parameter needed.
If that's not what you are looking for, you might have to explain a little bit more.
You are able to get endpoint key hash in 3 ways :
Get information from Client SDK on your device. Check appropriate documentation of you desirable SDK.
Look at Admin UI in Endpoint profiles menu.
Get via Admin REST API .
Please, check profiling section.
I think it will help you to find your desired information.

Resources