Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant receive the invitation mail #1579

Open
ZiLin3 opened this issue Nov 20, 2024 · 4 comments
Open

Cant receive the invitation mail #1579

ZiLin3 opened this issue Nov 20, 2024 · 4 comments
Assignees
Labels
area: model 📐 Related to the core SDK models question Further information is requested

Comments

@ZiLin3
Copy link

ZiLin3 commented Nov 20, 2024

Category

  • Bug

Describe the bug

I am attempting to share a document file with a user using the invitation method CreateSharingInviteAsync.

I executed the code as shown below, and it ran without any errors. I also verified that the document has granted read permissions to the user. However, the user did not receive the invitation email, despite setting SendInvitation= True.

image

here is my application permission
image

here is my sharing settings
image

Expected behavior

An invitation email should sent out to the user

Environment details (development & target environment)

DELETE THIS LINE BEFORE SUBMITTING - Complete the following (if ignored you'll be prompted for it before we can address your issue... save the time and provide it in your initial submission).

  • SDK version: PnP.Core.Admin 1.14.0 , PnP.Core.Auth 1.14.0
  • OS: Windows 11
  • SDK used in: Console App
  • Framework: .Net 8.0
  • Tooling: Visual Studio 2022

Thanks for your contribution! Sharing is caring.

@jansenbe
Copy link
Contributor

@ZiLin3 : I've just tested this myself by making the Graph call outside of PnP Core SDK (https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0&tabs=http) and I'm also not seeing a mail arriving. There's however an Exchange incident reported for my test tenant, that might impact this. Can you cross check that if you make the actual graph AAPI call things work for you?

Request:

> POST https://graph.microsoft.com/v1.0/sites/bertonline.sharepoint.com,7865418d-ba88-4b6d-80d2-aa13513fa1b1,0e8eaaa8-cea6-464e-8d5b-b1d0c1df3778/drives/b!jUFFFIi6bUuA0qoTUT-hsaiqjg6mzk5GjVux0MHfN3gdGKqOmz06Q6volw1KRMzD/items/01YO2ARP89HHM7KLPWWBBKDOUDVZZTDOLY/invite
> Authorization: Bearer eyJ0eXAiO....
> content-type: application/json
> data
{
  "requireSignIn": true,
  "sendInvitation": true,
  "roles": [
    "Read"
  ],
  "recipients": [
    {
      "email": "[email protected]"
    }
  ],
  "message": "I\u0027d like to share this file with you"
}

Response

< 200 OK
< cache-control: no-store, no-cache
< transfer-encoding: chunked
< content-type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
< location: https://graph.microsoft.com
< vary: Accept-Encoding
< strict-transport-security: max-age=31536000
< request-id: 203df578-04d3-4704-88ff-e583847c1660
< client-request-id: 203df578-04d3-4704-88ff-e583847c1660
< x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF000105AE"}}
< link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html", <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html"
< deprecation: Fri, 03 Sep 2021 23:59:59 GMT
< sunset: Sun, 01 Oct 2023 23:59:59 GMT
< odata-version: 4.0
< date: Mon, 25 Nov 2024 09:29:56 GMT

@jansenbe jansenbe self-assigned this Nov 25, 2024
@jansenbe jansenbe added question Further information is requested area: model 📐 Related to the core SDK models labels Nov 25, 2024
@nel0
Copy link

nel0 commented Nov 26, 2024

We're experiencing the same issue as @ZiLin3. Our code that uses PnP to share succeeds but no mails are sent out.

@jansenbe - I tried calling the Graph API directly and it also succeeds. But no mails are sent.
image

@ZiLin3
Copy link
Author

ZiLin3 commented Nov 26, 2024

I tested using Graph API, it succeeds, but no receive any invitation. Result same as @nel0 .

@jansenbe
Copy link
Contributor

@nel0 / @ZiLin3 : this is a platform issue. I would recommend that you (or your customers) open a support ticket explaining that the Graph call (show the raw API call not working from Graph Explorer or PostMan) is not triggering mail sending. From the PnP Core SDK side there's not much we can do, this feature used to work previously, so clearly something changed at the platform side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: model 📐 Related to the core SDK models question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants