{
    "api_version": "1",
    "kind": "dse_post",
    "self": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/",
    "item": {
        "id": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/",
        "slug": "dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment",
        "url": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/",
        "alternate_urls": {
            "markdown": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment.md",
            "json": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/"
        },
        "title": "Supply the principal type when a just-created identity's Azure role assignment races replication",
        "summary": "A newly created service principal can be unavailable to a role-assignment operation in another region.",
        "format": {
            "slug": "guide",
            "name": "Guide"
        },
        "priority": {
            "slug": "info",
            "name": "Information"
        },
        "featured": false,
        "image": {
            "theme": "identity-cloud",
            "label": "Identity & cloud",
            "alt": "Governed cloud identity system with connected service and lifecycle nodes.",
            "card_url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-card.webp?v=1.8.20",
            "hero_url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-hero.webp?v=1.8.20",
            "social_url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-social-v2.jpg?v=1.8.20",
            "width": 2400,
            "height": 1350
        },
        "topics": [
            {
                "slug": "cybersecurity",
                "name": "Cybersecurity",
                "url": "https://update.dsesecurity.com/topic/cybersecurity/"
            },
            {
                "slug": "it",
                "name": "IT",
                "url": "https://update.dsesecurity.com/topic/it/"
            },
            {
                "slug": "microsoft-365-identity",
                "name": "Microsoft 365 & Identity",
                "url": "https://update.dsesecurity.com/topic/microsoft-365-identity/"
            }
        ],
        "author": {
            "name": "DSE Security Editorial Team",
            "url": "https://update.dsesecurity.com/#editorial-team",
            "type": "Organization"
        },
        "publisher": {
            "name": "Detection Systems & Engineering",
            "url": "https://dsesecurity.com/"
        },
        "published_at": "2026-09-10T00:22:18+00:00",
        "modified_at": "2026-09-10T02:14:31+00:00",
        "reviewed_on": "2026-09-09",
        "reading_minutes": 2,
        "word_count": 240,
        "potentially_affected": "Azure CLI automation creating a service principal or managed identity and immediately assigning an Azure role.",
        "dse_recommendation": "Use the confirmed object ID and ServicePrincipal type for the documented creation-race case without broadening the role.",
        "primary_source": {
            "name": "Assign Azure roles using Azure CLI - Azure RBAC | Microsoft Learn",
            "url": "https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli",
            "published_on": null,
            "authority": "Microsoft Learn"
        },
        "publishing_principles": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
        "usage_info": "https://update.dsesecurity.com/usage/",
        "copyright_notice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
        "content_html": "<h2>Source facts</h2>\n<p>Microsoft documents that role assignment can fail immediately after service-principal creation because replication to another region may not yet have completed. A script that creates a managed identity and then assigns a role can encounter this condition; replication delay is a possible cause, not a diagnosis for every failure.</p>\n<p>For this scenario, the documented Azure CLI request supplies &#8211;assignee-object-id and sets &#8211;assignee-principal-type to ServicePrincipal. The intended role and scope remain separate inputs. <a href=\"https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn</a>.</p>\n<h2>Applicability</h2>\n<p>Confirm that the failing assignment follows new identity creation and that the object ID belongs to the intended principal. Examine the actual error and caller&#8217;s assignment authority before selecting the remedy.</p>\n<h2>DSE recommendation</h2>\n<p>DSE recommends making object identity and principal type explicit in the supported automation path. Preserve the least-privileged role and approved scope rather than substituting a broader role to work around a timing problem. If the failure persists, investigate its specific cause instead of repeatedly creating identities or assuming every authorization error is replication lag.</p>\n<h2>Verification</h2>\n<p>In an approved test, inspect the created identity and resulting assignment using their stable identifiers. Confirm that the assignment references the expected principal, role and scope, then test the intended access separately. Record failures and timing without claiming a fixed replication delay. A successful assignment should not be reported as proof that all resource-specific access prerequisites have been met.</p>\n<h2>Official references</h2>\n<p><a href=\"https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn: Assign Azure roles using Azure CLI &#8211; Azure RBAC</a>. Source retrieved September 9, 2026.</p>",
        "content_text": "Source facts\nMicrosoft documents that role assignment can fail immediately after service-principal creation because replication to another region may not yet have completed. A script that creates a managed identity and then assigns a role can encounter this condition; replication delay is a possible cause, not a diagnosis for every failure.\nFor this scenario, the documented Azure CLI request supplies –assignee-object-id and sets –assignee-principal-type to ServicePrincipal. The intended role and scope remain separate inputs. Microsoft Learn.\nApplicability\nConfirm that the failing assignment follows new identity creation and that the object ID belongs to the intended principal. Examine the actual error and caller’s assignment authority before selecting the remedy.\nDSE recommendation\nDSE recommends making object identity and principal type explicit in the supported automation path. Preserve the least-privileged role and approved scope rather than substituting a broader role to work around a timing problem. If the failure persists, investigate its specific cause instead of repeatedly creating identities or assuming every authorization error is replication lag.\nVerification\nIn an approved test, inspect the created identity and resulting assignment using their stable identifiers. Confirm that the assignment references the expected principal, role and scope, then test the intended access separately. Record failures and timing without claiming a fixed replication delay. A successful assignment should not be reported as proof that all resource-specific access prerequisites have been met.\nOfficial references\nMicrosoft Learn: Assign Azure roles using Azure CLI – Azure RBAC. Source retrieved September 9, 2026.",
        "content_markdown": "## Source facts\n\nMicrosoft documents that role assignment can fail immediately after service-principal creation because replication to another region may not yet have completed. A script that creates a managed identity and then assigns a role can encounter this condition; replication delay is a possible cause, not a diagnosis for every failure.\n\nFor this scenario, the documented Azure CLI request supplies –assignee-object-id and sets –assignee-principal-type to ServicePrincipal. The intended role and scope remain separate inputs. [Microsoft Learn](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli).\n\n## Applicability\n\nConfirm that the failing assignment follows new identity creation and that the object ID belongs to the intended principal. Examine the actual error and caller’s assignment authority before selecting the remedy.\n\n## DSE recommendation\n\nDSE recommends making object identity and principal type explicit in the supported automation path. Preserve the least-privileged role and approved scope rather than substituting a broader role to work around a timing problem. If the failure persists, investigate its specific cause instead of repeatedly creating identities or assuming every authorization error is replication lag.\n\n## Verification\n\nIn an approved test, inspect the created identity and resulting assignment using their stable identifiers. Confirm that the assignment references the expected principal, role and scope, then test the intended access separately. Record failures and timing without claiming a fixed replication delay. A successful assignment should not be reported as proof that all resource-specific access prerequisites have been met.\n\n## Official references\n\n[Microsoft Learn: Assign Azure roles using Azure CLI – Azure RBAC](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli). Source retrieved September 9, 2026."
    },
    "json_ld": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://dsesecurity.com/#organization",
                "name": "Detection Systems & Engineering",
                "alternateName": "DSE Security",
                "url": "https://dsesecurity.com/",
                "logo": {
                    "@type": "ImageObject",
                    "url": "https://update.dsesecurity.com/assets/dse-logo-20260812.png?v=1.8.20"
                }
            },
            {
                "@type": "Organization",
                "@id": "https://update.dsesecurity.com/#editorial-team",
                "name": "DSE Security Editorial Team",
                "url": "https://update.dsesecurity.com/",
                "parentOrganization": {
                    "@id": "https://dsesecurity.com/#organization"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://update.dsesecurity.com/#website",
                "name": "DSE Updates",
                "alternateName": "DSE Security Knowledge Hub",
                "url": "https://update.dsesecurity.com/",
                "inLanguage": "en-US",
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": {
                        "@type": "EntryPoint",
                        "urlTemplate": "https://update.dsesecurity.com/?q={search_term_string}"
                    },
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/",
                "isPartOf": {
                    "@id": "https://update.dsesecurity.com/#website"
                },
                "lastReviewed": "2026-09-09"
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/#breadcrumbs",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "DSE Updates",
                        "item": "https://update.dsesecurity.com/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Supply the principal type when a just-created identity's Azure role assignment races replication",
                        "item": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/"
                    }
                ]
            },
            {
                "@type": [
                    "Article",
                    "TechArticle"
                ],
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/#article",
                "identifier": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/",
                "headline": "Supply the principal type when a just-created identity's Azure role assignment races replication",
                "description": "A newly created service principal can be unavailable to a role-assignment operation in another region.",
                "abstract": "A newly created service principal can be unavailable to a role-assignment operation in another region.",
                "articleBody": "Source facts\nMicrosoft documents that role assignment can fail immediately after service-principal creation because replication to another region may not yet have completed. A script that creates a managed identity and then assigns a role can encounter this condition; replication delay is a possible cause, not a diagnosis for every failure.\nFor this scenario, the documented Azure CLI request supplies –assignee-object-id and sets –assignee-principal-type to ServicePrincipal. The intended role and scope remain separate inputs. Microsoft Learn.\nApplicability\nConfirm that the failing assignment follows new identity creation and that the object ID belongs to the intended principal. Examine the actual error and caller’s assignment authority before selecting the remedy.\nDSE recommendation\nDSE recommends making object identity and principal type explicit in the supported automation path. Preserve the least-privileged role and approved scope rather than substituting a broader role to work around a timing problem. If the failure persists, investigate its specific cause instead of repeatedly creating identities or assuming every authorization error is replication lag.\nVerification\nIn an approved test, inspect the created identity and resulting assignment using their stable identifiers. Confirm that the assignment references the expected principal, role and scope, then test the intended access separately. Record failures and timing without claiming a fixed replication delay. A successful assignment should not be reported as proof that all resource-specific access prerequisites have been met.\nOfficial references\nMicrosoft Learn: Assign Azure roles using Azure CLI – Azure RBAC. Source retrieved September 9, 2026.",
                "datePublished": "2026-09-10T00:22:18+00:00",
                "dateModified": "2026-09-10T02:14:31+00:00",
                "mainEntityOfPage": {
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/"
                },
                "inLanguage": "en-US",
                "isAccessibleForFree": true,
                "author": {
                    "@type": "Organization",
                    "name": "DSE Security Editorial Team",
                    "url": "https://update.dsesecurity.com/#editorial-team"
                },
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-578-supply-the-principal-type-when-a-just-created-identity-s-azure-role-assignment/#primaryimage",
                    "url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-social-v2.jpg?v=1.8.20",
                    "contentUrl": "https://update.dsesecurity.com/assets/editorial/identity-cloud-social-v2.jpg?v=1.8.20",
                    "width": 1200,
                    "height": 630,
                    "caption": "Supply the principal type when a just-created identity's Azure role assignment races replication"
                },
                "articleSection": [
                    "Cybersecurity",
                    "IT",
                    "Microsoft 365 & Identity"
                ],
                "keywords": [
                    "Cybersecurity",
                    "IT",
                    "Microsoft 365 & Identity",
                    "Guide",
                    "Information priority"
                ],
                "genre": "Guide",
                "about": [
                    {
                        "@type": "Thing",
                        "name": "Cybersecurity",
                        "url": "https://update.dsesecurity.com/topic/cybersecurity/"
                    },
                    {
                        "@type": "Thing",
                        "name": "IT",
                        "url": "https://update.dsesecurity.com/topic/it/"
                    },
                    {
                        "@type": "Thing",
                        "name": "Microsoft 365 & Identity",
                        "url": "https://update.dsesecurity.com/topic/microsoft-365-identity/"
                    }
                ],
                "wordCount": 240,
                "timeRequired": "PT2M",
                "publishingPrinciples": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
                "usageInfo": "https://update.dsesecurity.com/usage/",
                "copyrightHolder": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "copyrightNotice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
                "citation": {
                    "@type": "CreativeWork",
                    "name": "Assign Azure roles using Azure CLI - Azure RBAC | Microsoft Learn",
                    "url": "https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli"
                }
            }
        ]
    }
}