microsoftgraph / microsoftgraph/msgraph-beta-sdk-dotnet
MFA error getting microsoft.graph.partner.security.partnersecurityalerts using application permissions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 112
- Forks
- 37
- Avg merge
- 14h 57m
- Merged PRs (30d)
- 3
Description
I'm trying to get a list of partnersecurityalert objects using the microsoft.graph.partner.security Graph API
According to the documentation the API application permission PartnerSecurity.Read.All should be enough to get the list of alerts.
When I use application API permissions to call the API
var result = await graphClient.Security.Partner.SecurityAlerts.GetAsync();
I get the result:
403 ODataError: {"Error":{"Code":"Unauthorized_MissingMFA","Message":"MFA is required for this request. The provided authentication token does not have MFA claims."}}
Tested with both a certificate and with a managed identity (ManagedIdentityCredential object, using federated credential). The same app & graphClient object can use the Grapi API to get SharePoint sites, Teams or other objects.
When using application level permissions there is of course no way to do MFA, so this seems to be a bug in either the Graph API or the SDK.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Microsoft Graph partner security alerts documentation and reproduce the request at graphClient.Security.Partner.SecurityAlerts.GetAsync() using the certificate and managed identity setups described. Compare the documented PartnerSecurity.Read.All application permission with the returned Unauthorized_MissingMFA response; done means determining whether the behavior belongs to the API or SDK and recording the supported resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, authentication, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100