From 0132ae83bd162fc51d2823eb279cd0c95dfc9e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 1 Mar 2023 15:27:01 +0000 Subject: [PATCH 1/4] add userType to user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- api/openapi-spec/v1.0.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index ea85243..a5715e5 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -1657,12 +1657,14 @@ paths: enum: - id - displayName + - givenName - drive - drives - mail - memberOf - onPremisesSamAccountName - surname + - userType type: string - name: $expand in: query @@ -3399,6 +3401,9 @@ components: displayName: type: string description: 'The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $orderby.' + givenName: + type: string + description: The user's givenName. Returned by default. drives: type: array items: @@ -3431,14 +3436,12 @@ components: surname: type: string description: The user's surname (family name or last name). Returned by default. - givenName: - type: string - description: The user's givenName. Returned by default. - userType: - type: string - description: 'The user`s type. This can be either "Member" for regular user, or "Guest" for guest users.' preferredLanguage: $ref: '#/components/schemas/language' + userType: + type: string + enum: [Member, Guest] + description: 'A string value that can be used to classify user types in your directory, such as ''Member'' and ''Guest''. Returned only on $select. Supports $filter.' itemReference: type: object properties: From 1bb23a09d73a7494289347f60cb69e9110998e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 1 Mar 2023 15:41:39 +0000 Subject: [PATCH 2/4] add invitation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- api/openapi-spec/v1.0.yaml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index a5715e5..7ef7a5e 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -1530,6 +1530,28 @@ paths: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation + /v1beta1/invitations: + post: + tags: + - invitations + summary: Invite a user to the organization + operationId: CreateInvitation + requestBody: + description: New invitation + content: + application/json: + schema: + $ref: '#/components/schemas/invitation' + required: true + responses: + '201': + description: Created invitation + content: + application/json: + schema: + $ref: '#/components/schemas/invitation' + default: + $ref: '#/components/responses/error' /v1.0/users: get: tags: @@ -3313,6 +3335,31 @@ components: id: type: string description: Unique identifier for the identity. + invitation: + type: object + required: + - invitedUserEmailAddress + - inviteRedirectUrl + properties: + invitedUserDisplayName: + type: string + description: The display name of the user being invited. + invitedUserEmailAddress: + type: string + description: The email address of the user being invited. Required. + inviteRedirectUrl: + type: string + description: The URL the user should be redirected to once the invitation is redeemed. Required. + sendInvitationMessage: + type: boolean + description: Indicates whether an email should be sent to the user being invited. The default is false. + status: + type: string + enum: [PendingAcceptance, Completed, InProgress, Error] + description: 'The status of the invitation. Possible values are: ''PendingAcceptance'', ''Completed'', ''InProgress'', and ''Error''.' + invitedUser: + $ref: '#/components/schemas/user' + description: The user created as part of the invitation creation. Read-Only objectIdentity: description: Represents an identity used to sign in to a user account type: object From c55d753ddf5a316b588da3ebf432971d6175cbd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 1 Mar 2023 15:50:01 +0000 Subject: [PATCH 3/4] add userType to educationUser as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- api/openapi-spec/v1.0.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index 7ef7a5e..5670c71 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -1957,6 +1957,7 @@ paths: displayName: Max Mustermann mail: max.musterman@example.org primaryRole: student + userType: Member identities: - issuer: idp.school.com issuerAssignedId: max.mustermann @@ -2076,6 +2077,7 @@ paths: givenName: Max mail: max.musterman@new.domain primaryRole: student + userType: Member identities: - issuer: idp.school.com issuerAssignedId: max.mustermann @@ -2290,6 +2292,7 @@ paths: givenName: Max mail: max.musterman@example.org primariyRole: student + userType: Member identities: - issuer: idp.school.com issuerAssignedId: max.mustermann @@ -2644,6 +2647,7 @@ paths: givenName: Max mail: max.musterman@example.org primariyRole: student + userType: Member identities: - issuer: idp.school.com issuerAssignedId: max.mustermann @@ -2746,6 +2750,7 @@ paths: givenName: Max mail: max.musterman@example.org primariyRole: teacher + userType: Member identities: - issuer: idp.school.com issuerAssignedId: max.mustermann @@ -3149,6 +3154,9 @@ components: displayName: type: string description: 'The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $orderby.' + givenName: + type: string + description: The user's givenName. Returned by default. drives: type: array items: @@ -3181,15 +3189,14 @@ components: surname: type: string description: The user's surname (family name or last name). Returned by default. - givenName: - type: string - description: The user's givenName. Returned by default. primaryRole: type: string + enum: [student, teacher] description: 'The user`s default role. Such as "student" or "teacher"' userType: type: string - description: 'The user`s type. This can be either "Member" for regular user, or "Guest" for guest users.' + enum: [Member, Guest] + description: 'A string value that can be used to classify user types in your directory, such as ''Member'' and ''Guest''. Returned only on $select. Supports $filter.' drive: description: The drive represents a space on the storage. type: object @@ -4684,6 +4691,7 @@ components: givenName: Max mail: max.musterman@example.org primaryRole: student + userType: Member identities: - issuer: idp.school.com issuerAssignedId: max.mustermann @@ -4695,6 +4703,7 @@ components: givenName: Max mail: max.musterman@example.org primaryRole: student + userType: Member identities: - issuer: idp.school.com issuerAssignedId: max.mustermann From 2c9951d8c0f2c14ddc6c111a557838c2adacdcee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 4 Jan 2024 10:51:17 +0100 Subject: [PATCH 4/4] do not move properties to reduce diff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- api/openapi-spec/v1.0.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index 5670c71..f29ac64 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -3154,9 +3154,6 @@ components: displayName: type: string description: 'The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $orderby.' - givenName: - type: string - description: The user's givenName. Returned by default. drives: type: array items: @@ -3189,6 +3186,9 @@ components: surname: type: string description: The user's surname (family name or last name). Returned by default. + givenName: + type: string + description: The user's givenName. Returned by default. primaryRole: type: string enum: [student, teacher] @@ -3455,9 +3455,6 @@ components: displayName: type: string description: 'The name displayed in the address book for the user. This value is usually the combination of the user''s first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Returned by default. Supports $orderby.' - givenName: - type: string - description: The user's givenName. Returned by default. drives: type: array items: @@ -3490,12 +3487,15 @@ components: surname: type: string description: The user's surname (family name or last name). Returned by default. - preferredLanguage: - $ref: '#/components/schemas/language' + givenName: + type: string + description: The user's givenName. Returned by default. userType: type: string enum: [Member, Guest] description: 'A string value that can be used to classify user types in your directory, such as ''Member'' and ''Guest''. Returned only on $select. Supports $filter.' + preferredLanguage: + $ref: '#/components/schemas/language' itemReference: type: object properties: