-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update-M365DSCAzureAdApplication could grant permissions to non-MS service application #2565
Comments
This is a valid enhancement! Thanks for the insights. Just to add some complexity: Are the other Endpoints like SharePoint also published this ID? |
Yes.
Likewise, in the spirit of reducing dependencies it might be an opportune time to transition to MG in which case the property name changes to AppOwnerOrganizationId |
Do you know what the two other microsoft graph objects are for? |
This is the output of my default tenant: $endpointlist | % { Get-AzureADServicePrincipal -Filter "displayName eq '$_'" | Select-Object DisplayName, AppOwnerTenantId }
DisplayName AppOwnerTenantId
----------- ----------------
Microsoft Graph f8cdef31-a31e-4b4a-93e4-5f571e91255a
Office 365 SharePoint Online f8cdef31-a31e-4b4a-93e4-5f571e91255a
Office 365 Exchange Online f8cdef31-a31e-4b4a-93e4-5f571e91255a
|
Yup, that is the 1st party tenant where Microsoft services are published from. The other SPs in my example are applications that individuals have registered in the tenant with the same display name as the official SP. Since there are no checks for uniqueness and no validation, it is possible for anyone who can register an application to do so with the same name as a published service. It's then up to the consumer to know what the return value actually means, |
Details of the scenario you tried and the problem that is occurring
Update-M365DSCAzureAdApplication is used to update a dedicated application with service endpoint permissions - Microsoft Graph, Office 365 SharePoint Online and/or Office 365 Exchange Online - retrieved via Get-AzADServicePrincipal, filtering the result set based on displayName. Since displayName is a non-unique value in Azure, this opens the possibility of retrieving multiple entries for a single name and does not guarantee the servicePrincipal is the actual Microsoft service,e.g.
Verbose logs showing the problem
Suggested solution to the issue
e.g.
$gsp = Get-AzADServicePrincipal -Filter "displayName eq 'Microsoft Graph'" | Where-Object -FilterScript {$_.AppOwnerTenantId-eq 'f8cdef31-a31e-4b4a-93e4-5f571e91255a'}'"
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
The operating system the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
The text was updated successfully, but these errors were encountered: