graph
2 TopicsUpdate App Registration Client Secret Using Microsoft Graph REST API v1.0
Hello, I have a customer who wants to set the App registration Client Secret to 1 year. Here are the customer's requirements: For existing application registrations under ‘Certificates & Secrets’ pane, any new secrets added by owners should have the duration limited to one year. If the owner tries to set the duration greater than one year and clicks ‘Add’ button, the action should not be allowed with proper error displayed. The same behavior should also be applicable to new application registration specific secrets. It should not impact any existing secret that is present (greater or less than one year) for current application registrations. We need a way to enable and disable the global policy in case we want to disable it if something doesn’t work as expected. We don’t want to impact anything else wrt application registrations or anything in service principles. Based on the article you shared; Microsoft Entra application management policy API overview - Microsoft Graph v1.0 | Microsoft Learn Below is the script we are trying to use to add the global policy and set as default policy with isEnabled = true. As we cannot test in a different tenant, can you please confirm the snippet below will work for the above requirements? MgPolicyAppManagementPolicy|select* $policy=@{ "displayName"="Enforce Max Lifetime for Secrets" "description"="Policy to enforce a maximum lifetime of 1 year for any new secrets." "applicationRestrictions"=@{ "passwordCredentials"=@{ "maxLifetime"="P365D"# ISO 8601 duration format for 1 year } } } New-MgPolicyAppManagementPolicy-BodyParameter$policy Update-MgPolicyDefaultAppManagementPolicy -id <ABOVE_POLICY_ID -IsEnabled $true I tried to test it in my own tenant, but I ran to a permission issue. Can someone please confirm if this snippet works against the customer's requirements? Thanks.106Views0likes4CommentsGetting an error when trying to use Microsoft.Graph.Auth Nuget package
I'm adding some code to access Graph to an ASP.net MVC project. When I add the latest Microsoft.Graph.Auth package from Nuget I get the following error when I build: Error Unable to parse version value '1.0.0-preview.5' from 'packages.config'. The other graph libraries work fine. I've used the auth package just fine in another mvc core project. I'm using VS 2019 Enterprise. Has anyone seen this issue? Thanks1.9KViews0likes0Comments