Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,24 @@ From the root folder `/msgraph-bicep-types` run the following PowerShell script
```

After running the scripts the new types will be available in [/generated](./generated) folder.

### Regenerate an existing version from its Swagger snapshot

For an explicitly approved correction to an existing version, update that version's
YAML configuration and the corresponding versioned Swagger snapshots under both
`src/swagger-generation/output` and `swagger/specification`. Preserve unrelated
schema shapes: regenerating historical Swagger from the current metadata can
introduce unrelated changes.

After building `src/autorest.bicep`, run from `src/generator`:

```powershell
npm run generate -- --specs-dir ..\..\swagger --single-path microsoftgraph --extension-version 1.0.0
npm run generate -- --specs-dir ..\..\swagger --single-path microsoftgraph --extension-version 1.1.0-preview
```

Omitting `--extension-version` retains the default latest-configured-version
behavior. Explicit selection supports `1.0.0` and `1.1.0-preview` only; older
versions can have incompatible index shapes. Compare the resulting serialized graphs with the original versions,
test both API versions, and validate compiler diagnostics and emitted deployment
inputs before publishing. Source changes do not replace published packages.
20 changes: 20 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Getting started

Go to [Bicep templates for Microsoft Graph](https://aka.ms/graphbicep).

## Read-only authoring corrections in 1.0.0 and 1.1.0-preview

The 1.0.0 and 1.1.0-preview type definitions correct ordinary resource-body writes for these properties in both the `v1.0` and `beta` API versions:

| Resource | Read-only properties |
|---|---|
| `Microsoft.Graph/groups` | `isManagementRestricted`, `serviceProvisioningErrors` |
| `Microsoft.Graph/applications` | `disabledByMicrosoftStatus`, `verifiedPublisher` |
| `Microsoft.Graph/servicePrincipals` | `disabledByMicrosoftStatus` |

These properties remain available for reads and outputs. Assignments produce read-only warnings with Bicep 0.48.1; builds still succeed, but custom gates that reject warnings can fail. Remove these assignments from resource declarations. This corrects the authoring contract, not the underlying service behavior or permissions, and preserves each version's existing relationship shapes. Updating these source artifacts does not replace already-published or cached extension packages.

`isManagementRestricted` reflects restricted-management administrative-unit membership; it is not a switch for placing a group in an administrative unit. `serviceProvisioningErrors` is service-produced diagnostic state. See the [group contract](https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0) and the [confirmed provisioning-error annotation gap](https://github.com/microsoftgraph/msgraph-bicep-types/issues/257#issuecomment-3184478843).

`disabledByMicrosoftStatus` is Microsoft-controlled status, not a way to enable or disable an application. See [application](https://learn.microsoft.com/en-us/graph/api/resources/application?view=graph-rest-1.0) and [service principal](https://learn.microsoft.com/en-us/graph/api/resources/serviceprincipal?view=graph-rest-1.0) contracts and the [confirmed read-only behavior](https://github.com/microsoftgraph/msgraph-bicep-types/issues/260).

Application publisher verification requires the separate [setVerifiedPublisher action](https://learn.microsoft.com/en-us/graph/api/application-setverifiedpublisher?view=graph-rest-1.0); setting `verifiedPublisher` in a Bicep resource body is not supported. This patch does not add that action or app-only verification.

Service-principal `appRoles`, `addIns`, supported URLs, and `servicePrincipalNames` are deliberately not made globally read-only. Writability depends on the property, service-principal type, and whether values originate from the backing application. In particular, inherited application roles differ from service-principal-local roles, and additional service-principal names have hybrid-application restrictions. See [update servicePrincipal](https://learn.microsoft.com/en-us/graph/api/serviceprincipal-update?view=graph-rest-1.0) and [appRole](https://learn.microsoft.com/en-us/graph/api/resources/approle?view=graph-rest-1.0).
10 changes: 5 additions & 5 deletions generated/microsoftgraph/microsoft.graph/beta/1.0.0/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"$ref": "#/7"
},
"flags": 2,
"description": "Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit."
"description": "Indicates whether the group is a member of a restricted management administrative unit. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. See [restricted management administrative units](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/admin-units-restricted-management)."
},
"mail": {
"type": {
Expand Down Expand Up @@ -255,7 +255,7 @@
"type": {
"$ref": "#/14"
},
"flags": 0,
"flags": 2,
"description": "Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object."
},
"theme": {
Expand Down Expand Up @@ -588,7 +588,7 @@
"type": {
"$ref": "#/0"
},
"flags": 0,
"flags": 2,
"description": "Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement)."
},
"displayName": {
Expand Down Expand Up @@ -763,7 +763,7 @@
"type": {
"$ref": "#/69"
},
"flags": 0,
"flags": 2,
"description": "Specifies the verified publisher of the application. For more information about how publisher verification helps support application security, trustworthiness, and compliance, see Publisher verification."
},
"web": {
Expand Down Expand Up @@ -1843,7 +1843,7 @@
"type": {
"$ref": "#/0"
},
"flags": 0,
"flags": 2,
"description": "Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement)."
},
"displayName": {
Expand Down
10 changes: 5 additions & 5 deletions generated/microsoftgraph/microsoft.graph/beta/1.0.0/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* **defaultRedirectUri**: string: The default redirect URI. If specified and there's no explicit redirect URI in the sign-in request for SAML and OIDC flows, Microsoft Entra ID sends the token to this redirect URI. Microsoft Entra ID also sends the token to this default URI in SAML IdP-initiated single sign-on. The value must match one of the configured redirect URIs for the application.
* **deletedDateTime**: string (ReadOnly): Date and time when this object was deleted. Always null when the object hasn't been deleted.
* **description**: string: Free text field to provide a description of the application object to end users. The maximum allowed size is 1,024 characters.
* **disabledByMicrosoftStatus**: string: Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement).
* **disabledByMicrosoftStatus**: string (ReadOnly): Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement).
* **displayName**: string (Required): The display name for the application. Maximum length is 256 characters.
* **groupMembershipClaims**: string: Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following string values: None, SecurityGroup (for security groups and Microsoft Entra roles), All (this gets all security groups, distribution groups, and Microsoft Entra directory roles that the signed-in user is a member of).
* **id**: string (ReadOnly): The unique identifier for an entity. Read-only.
Expand Down Expand Up @@ -42,7 +42,7 @@
* **tokenEncryptionKeyId**: string {minLength: 36, maxLength: 36, pattern: "^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$"}: Specifies the keyId of a public key from the keyCredentials collection. When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user.
* **type**: 'Microsoft.Graph/applications' (ReadOnly, DeployTimeConstant): The resource type
* **uniqueName**: string (Required, DeployTimeConstant, Identifier): The unique identifier that can be assigned to an application and used as an alternate key. Immutable.
* **verifiedPublisher**: [MicrosoftGraphVerifiedPublisher](#microsoftgraphverifiedpublisher): Specifies the verified publisher of the application. For more information about how publisher verification helps support application security, trustworthiness, and compliance, see Publisher verification.
* **verifiedPublisher**: [MicrosoftGraphVerifiedPublisher](#microsoftgraphverifiedpublisher) (ReadOnly): Specifies the verified publisher of the application. For more information about how publisher verification helps support application security, trustworthiness, and compliance, see Publisher verification.
* **web**: [MicrosoftGraphWebApplication](#microsoftgraphwebapplication): Specifies settings for a web application.
* **windows**: [MicrosoftGraphWindowsApplication](#microsoftgraphwindowsapplication): Specifies settings for apps running Microsoft Windows and published in the Microsoft Store or Xbox games store.

Expand Down Expand Up @@ -90,7 +90,7 @@
* **id**: string (ReadOnly): The unique identifier for an entity. Read-only.
* **infoCatalogs**: string[]: Identifies the info segments assigned to the group.
* **isAssignableToRole**: bool: Indicates whether this group can be assigned to a Microsoft Entra role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group cannot be a dynamic group (that is, groupTypes can't contain DynamicMembership). Only callers with at least the Privileged Role Administrator role can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Microsoft Entra role assignmentsUsing this feature requires a Microsoft Entra ID P1 license.
* **isManagementRestricted**: bool (ReadOnly): Indicates whether the group is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit.
* **isManagementRestricted**: bool (ReadOnly): Indicates whether the group is a member of a restricted management administrative unit. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. See [restricted management administrative units](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/admin-units-restricted-management).
* **mail**: string (ReadOnly): The SMTP address for the group, for example, 'serviceadmins@contoso.com'. Read-only.
* **mailEnabled**: bool (Required): Specifies whether the group is mail-enabled. Required.
* **mailNickname**: string (Required): The mail alias for the group, unique for Microsoft 365 groups in the organization. Maximum length is 64 characters. This property can contain only characters in the ASCII character set 0 - 127 except the following: @ () / [] ' ; : <> , SPACE.
Expand All @@ -114,7 +114,7 @@
* **resourceProvisioningOptions**: string[]: Specifies the group resources that are associated with the Microsoft 365 group. The possible value is Team. For more information, see Microsoft 365 group behaviors and provisioning options.
* **securityEnabled**: bool (Required): Specifies whether the group is a security group.
* **securityIdentifier**: string (ReadOnly): Security identifier of the group, used in Windows scenarios. Read-only.
* **serviceProvisioningErrors**: [MicrosoftGraphServiceProvisioningError](#microsoftgraphserviceprovisioningerror)[]: Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object.
* **serviceProvisioningErrors**: [MicrosoftGraphServiceProvisioningError](#microsoftgraphserviceprovisioningerror)[] (ReadOnly): Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object.
* **theme**: string: Specifies a Microsoft 365 group's color theme. Possible values are Teal, Purple, Green, Blue, Pink, Orange or Red.
* **type**: 'Microsoft.Graph/groups' (ReadOnly, DeployTimeConstant): The resource type
* **uniqueName**: string (Required, DeployTimeConstant, Identifier): The unique identifier that can be assigned to a group and used as an alternate key. Immutable.
Expand Down Expand Up @@ -229,7 +229,7 @@
* **appRoles**: [MicrosoftGraphAppRole](#microsoftgraphapprole)[]: The roles exposed by the application, which this service principal represents. For more information, see the appRoles property definition on the application entity. Not nullable.
* **deletedDateTime**: string (ReadOnly): Date and time when this object was deleted. Always null when the object hasn't been deleted.
* **description**: string: Free text field to provide an internal end-user facing description of the service principal. End-user portals such MyApps displays the application description in this field. The maximum allowed size is 1,024 characters.
* **disabledByMicrosoftStatus**: string: Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement).
* **disabledByMicrosoftStatus**: string (ReadOnly): Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement).
* **displayName**: string: The display name for the service principal.
* **homepage**: string: Home page or landing page of the application.
* **id**: string (ReadOnly): The unique identifier for an entity. Read-only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"$ref": "#/7"
},
"flags": 2,
"description": "Indicates whether the group is a member of a restricted management administrative unit. The default value is false. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit."
"description": "Indicates whether the group is a member of a restricted management administrative unit. Read-only. To manage a group member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. See [restricted management administrative units](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/admin-units-restricted-management)."
},
"mail": {
"type": {
Expand Down Expand Up @@ -255,7 +255,7 @@
"type": {
"$ref": "#/14"
},
"flags": 0,
"flags": 2,
"description": "Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object."
},
"theme": {
Expand Down Expand Up @@ -636,7 +636,7 @@
"type": {
"$ref": "#/0"
},
"flags": 0,
"flags": 2,
"description": "Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement)."
},
"displayName": {
Expand Down Expand Up @@ -811,7 +811,7 @@
"type": {
"$ref": "#/70"
},
"flags": 0,
"flags": 2,
"description": "Specifies the verified publisher of the application. For more information about how publisher verification helps support application security, trustworthiness, and compliance, see Publisher verification."
},
"web": {
Expand Down Expand Up @@ -1891,7 +1891,7 @@
"type": {
"$ref": "#/0"
},
"flags": 0,
"flags": 2,
"description": "Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement)."
},
"displayName": {
Expand Down
Loading