-
Notifications
You must be signed in to change notification settings - Fork 139
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
Invalid Team ID #1816
Comments
Thank you for reporting the issue. This is the first time I saw this particular issue. I think the best thing to do is to analyse the exact parameters used to call the Graph API to create the class team, and try the same from Graph Explorer to see if it works. The Graph API call to create class team is at o365-moodle/local/o365/classes/rest/unified.php Lines 2198 to 2225 in 130d3e3
Please add var_dump() to output the $teamdata, and see what it contains. When you have it, and you don't see anything obvious, go to Graph Explorer at https://developer.microsoft.com/en-us/graph/graph-explorer, login using your account, and try to make the same call and same parameters, and see if it produces the same error. You may want to check the permissions required for the call as well and ensure your app has them as well, although the error message doesn't indicate it's permission related. Regards, |
Thanks for your reply! |
The Cyrillic characters would explain many issue that you experienced. The action to add random 3 digits to team names is completely on Microsoft side, and the Moodle plugin has no control over it. However, there is a possible solution to it - besides adding a prefix to the team name, it's also possible to use other course fields in the team name. The available options are:
The setting is called "Course part of the Teams name" and can be found in the "Teams name" section in "Sync Settings" tab, just below you prefix is configured. Regards, |
Greetings! Thank you for your help. We would like to keep course names as is, adding other codes or characters might confuse our users. However, Microsoft Graph behavior while handling Cyrillic characters isn't normal. I'm thinking about writing a feature request to Microsoft for handling non-Latin characters, but I don’t know where to leave it. In any case, can we have more distinct error messages in the future versions of the plugin? That would be so much helpful than just "Invalid Team ID". Thanks again! |
Greetings!
We are having this issue right now. Graph API is connected, everything else seems to be working.
Please note that this issue just stopped our workflow, we are unable to create new teams and have to rely on other platforms in order to continue our work.
Here is the output from the modified groupcreate.php task with var_dump on line 349
string(1808) "{"error":{"code":"BadRequest","message":"Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: bd692c8ae97a1149ae487cd91cdf7e1a\r\nx-telemetryid: 00-bd692c8ae97a1149ae487cd91cdf7e1a-89b00de86272fe49-00\r\nX-MSEdge-Ref: Ref A: 92D081F92EFA4D91B444F2A3767A78A5 Ref B: VIEEDGE3010 Ref C: 2021-09-14T10:43:06Z\r\nDate: Tue, 14 Sep 2021 10:43:06 GMT\r\n, ErrorMessage : {"errors":[{"message":"Error when calling Middle Tier. Message: ''. Error code: 'UnableToGenerateValidTeamAlias'. Status code: BadRequest.","errorCode":"Unknown"}],"operationId":"bd692c8ae97a1149ae487cd91cdf7e1a"}","innerError":{"message":"Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: bd692c8ae97a1149ae487cd91cdf7e1a\r\nx-telemetryid: 00-bd692c8ae97a1149ae487cd91cdf7e1a-89b00de86272fe49-00\r\nX-MSEdge-Ref: Ref A: 92D081F92EFA4D91B444F2A3767A78A5 Ref B: VIEEDGE3010 Ref C: 2021-09-14T10:43:06Z\r\nDate: Tue, 14 Sep 2021 10:43:06 GMT\r\n, ErrorMessage : {"errors":[{"message":"Error when calling Middle Tier. Message: ''. Error code: 'UnableToGenerateValidTeamAlias'. Status code: BadRequest.","errorCode":"Unknown"}],"operationId":"bd692c8ae97a1149ae487cd91cdf7e1a"}","code":"BadRequest","innerError":{},"date":"2021-09-14T10:43:07","request-id":"c9c61324-3b40-40f4-af78-f8e8e378dbf8","client-request-id":"c9c61324-3b40-40f4-af78-f8e8e378dbf8"}}}"
Could not create class team for #13514. Reason: invalid team ID
Syncing group membership for course #13514
Could not find group object ID in local_o365_objects for course 13514. Please ensure group exists first.
Moodle 3.11.3 (Build: 20210913)
local_o365 3.11.0 (2021051700)
Originally posted by @OscarTheFabulous in #1784 (comment)
The text was updated successfully, but these errors were encountered: