Bug in "Update-MgPolicyDefaultAppManagementPolicy"? - restrictionType "customPasswordAddition" and "symmetricKeyAddition" is null even if set?
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- powershell
- Ambito
- api
Direzione di ricerca
Inizia con il cmdlet Update-MgPolicyDefaultAppManagementPolicy e confronta la relativa richiesta PATCH con la risposta GET di /policies/defaultAppManagementPolicy usando l’esempio fornito per PowerShell 5.1 e SDK 2.28.0. Verifica se customPasswordAddition e symmetricKeyAddition vengono omessi dall’SDK o dalla Graph API e conferma che le due restrizioni configurate vengano restituite come previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
I feel this is so strange - no errors when parseing the content via cmdlet "Update-MgPolicyDefaultAppManagementPolicy" in PowerShell, and as I see it Entra ID Auditlog also shows it right...
And when I looking in docs at https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.signins/update-mgpolicydefaultappmanagementpolicy?view=graph-powershell-1.0 it should work just fine....
Working on a small tool as I shared a teaser here: https://www.linkedin.com/feed/update/urn:li:activity:7337869500135919617/ aka "Entra ID Application Policy Manager" so this type of errors is a bit enoying as it breaks stuff for people there is useing Entra ID Application Management Policies...
Tested here with:
2.28.0 Microsoft.Graph.Applications
2.28.0 Microsoft.Graph.Authentication
2.28.0 Microsoft.Graph.Identity.SignIns
Will test other too soon and update here!
Expected behavior
I exprect the values set, it not returned at "null" if etc. set to P40D or so.
How to reproduce
- run this to parse it to Graph (will not show any errors):
$params = @{
isEnabled = $true
applicationRestrictions = @{
passwordCredentials = @(
@{
restrictionType = "passwordAddition"
maxLifetime = $null
restrictForAppsCreatedAfterDateTime = [System.DateTime]::Parse("2021-01-01T10:37:00Z")
}
@{
restrictionType = "passwordLifetime"
maxLifetime = "P40D"
restrictForAppsCreatedAfterDateTime = [System.DateTime]::Parse("2017-01-01T10:37:00Z")
}
@{
restrictionType = "symmetricKeyAddition"
maxLifetime = "P40D"
restrictForAppsCreatedAfterDateTime = [System.DateTime]::Parse("2021-01-01T10:37:00Z")
}
@{
restrictionType = "customPasswordAddition"
maxLifetime = "P40D"
restrictForAppsCreatedAfterDateTime = [System.DateTime]::Parse("2015-01-01T10:37:00Z")
}
@{
restrictionType = "symmetricKeyLifetime"
maxLifetime = "P40D"
restrictForAppsCreatedAfterDateTime = [System.DateTime]::Parse("2015-01-01T10:37:00Z")
}
)
keyCredentials = @(
@{
restrictionType = "asymmetricKeyLifetime"
maxLifetime = "P30D"
restrictForAppsCreatedAfterDateTime = [System.DateTime]::Parse("2015-01-01T10:37:00Z")
}
)
}
}
Update-MgPolicyDefaultAppManagementPolicy -BodyParameter $params
- Check if the settings is set - both via Entra ID Audit log like here:
and via etc. https://developer.microsoft.com/en-us/graph/graph-explorer with a GET call to "https://graph.microsoft.com/v1.0/policies/defaultAppManagementPolicy" - here you will see this for the above code:
- Done - the policy is set in Entra ID - but the 2 parts customPasswordAddition and symmetricKeyAddition is not set - the rest are... This is tested for applicationRestrictions for now (will test more)
SDK Version
2.28.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
``` Update-MgPolicyDefaultAppManagementPolicy -BodyParameter $params -Verbose VERBOSE: Performing the operation "Update-MgPolicyDefaultAppManagementPolicy_Update" on target "Call remote 'PATCH /policies/defaultAppManagementPolicy' operation". ```Configuration
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.26100.4061
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.4061
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Windows 11 26100.3983, x64
Other information
This bug is reported back in the channels I have too as a Microsoft MVP and as a member of the CCP Communities..
- Lingua principale
- C#
- Stelle
- 902
- Fork
- 233
- Merge medio
- 1g 3h
- PR unite (30g)
- 24
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-sdk-powershell
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
I maintainer di solito rispondono entro 1 giorno
-
New-MgGroupMember Missing from DocsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertastatus:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoftgraph/msgraph-sdk-powershell#3751 ·
I maintainer di solito rispondono entro 1 giorno
-
Graph PowerShell 2.41.0: Connect-MgGraph fails loading System.Text.Json 10; downgrading to 2.40.0 resolvesForse già presa @svrooij l’ha presa 2 giorni fa. ApertaNeeds: Attention :wave: status:waiting-for-triage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
microsoftgraph/msgraph-sdk-powershell#3810 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
status:waiting-for-triage type:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · 3 commenti · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Microsoft.Graph.Authentication fails after removal and re-import in the same PowerShell sessionApertastatus:waiting-for-triage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
microsoftgraph/msgraph-sdk-powershell#3805 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoftgraph/msgraph-sdk-powershell
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
activescott/lessmsi#306 ·
-
Python: Bug: split_plaintext_paragraph / split_markdown_paragraph can return a chunk larger than max_tokensForse già presa @xThreeh l’ha presa oggi. Apertapython triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/semantic-kernel#14566 ·
I maintainer di solito rispondono entro 4 giorni
-
triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
rjmurillo/moq.analyzers#1384 ·
-
Variables passed to Compensated are not set on the routing slipForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
MassTransit/MassTransit#6249 ·
-
security
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Sendspin/sendspin-dotnet#339 ·
I maintainer di solito rispondono entro 1 giorno