Moodle office tool integrations

OneNote, Office365 and MS Mix Plugins now available

 
Picture of Mike Churchward
OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers
Hi All -
Microsoft and Remote-Learner have just released the first versions of a series of plug-ins that makeOneNote and Office365 for Business integration with Moodle available. We have also updated the Oembed filter to provide pluggabiluty for Microsoft Mix applets.

You can get the OneNote set of plugins here: https://moodle.org/plugins/browse.php?list=set&id=71
You can get the Office365 for Business set of plugins here: https://moodle.org/plugins/browse.php?list=set&id=72

The Oembed filter is available here: https://moodle.org/plugins/view/filter_oembed. It may still be out of date, but will be updated shortly.

There is information in each plug-in set on how to install and use it, and there is further documentation available as well. I also discussed the development in several posts on my blog, starting with this post. Each subsequent posts expands a bit more on the functionality.

We'll work on getting a Moodle Tracker item set up for feature requests and bug reports.

mike

 
Average of ratings: -
Picture of Mauno Korpelainen
Re: OneNote, Office365 and MS Mix Plugins now available
 

Can they be used also with moodle 2.8+ ? ( in plugin info: Supports moodle 2.7 )

We upgraded our production site to moodle 2.8 in December and we use Office365 for Business outside our moodle site so I am very interested in testing these plugins.

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Mauno -

We focused on 2.7 initially, since it is the Moodle LTS version. We're testing them with 2.8 now, and will release 2.8 versions very soon.

mike

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Just an update - 2.8 is now available.

 
Average of ratings: -
Picture of Dario Züger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike

Congratulations. Great tool. We are also developping educational solutions for SharePoint online. So this is interesting for us. May be you can answer my questions:

  • We have connected our Azure AD with Moodle through your plugins. Is there a method, that automatically creates the Azure AD users in Moodle before they are accessing Moodle?
  • Is there a possibility to also define a separate site collection then the root site collection? Our e-learning tool for SharePoint is creating class- and course websites in a separate site collection and they are there also situated in subsites like tenant.sharepoint.com/sites/elearning/classes/class1 or tenant.sharepoint.com/sites/elelarning/courses/course1 etc.
  • Can we define that all files on a course site will automatically be saved on SharePoint and not on Moodle?
  • We initialized the SharePoint websites for our courses and can also see the folders in the file picker on Moodle. But we cannot upload new files to SharePoint. Our user is a manager in the course. The "upload new file" button is missing. We have Moodle 2.8.2+. Do you have an idea?

Thanks for your help.

 
Average of ratings: -
Picture of William Lu
Re: OneNote, Office365 and MS Mix Plugins now available
Group Particularly helpful Moodlers
Hi Dario,

I am curious about how to use the SharePoint (Hosted inside our organization, not OneDrive) as a  Moodle repository. Is it possible? Are you developing a plugin for this? How did yo see folders of SharePoint Websites?

Thanks

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi William - The plugins we've released connect to SharePoint and allow the files to be viewable in a Moodle repository. We create a SharePoint site for each Moodle course, then display the contents of that site's documents through the repository UI. Each teacher in the course is able to access the SharePoint site's documents, serving a a shared repository for the course.

 
Average of ratings: -
Picture of William Lu
Re: OneNote, Office365 and MS Mix Plugins now available
Group Particularly helpful Moodlers

Hi James,

Thank you for your good news and I checked this page https://moodle.org/plugins/browse.php?list=set&id=71. There are so many cool plugins there, all with your name as the  first developer.

In my organisation, we host our own SharePoint Sever, I can create sites for any Moodle course. Please advise me which plugin in your products I should install?  


Thank you again.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

HI William,

The plugins  come as a package, so the plugins listed at https://moodle.org/plugins/browse.php?list=set&id=72 are the ones you want.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Dario,

Thanks for trying out the plugins! I'm the lead dev for the project.

Answers:

1. You can have AzureAD users automatically created by enabling the "Sync users from AzureAD" setting in the Microsoft Office 365 Integration local plugin settings. This will sync users on an on-going basis every time the site cron is run.

2. Currently you can only create one site collection, but we'll look at adding that feature - sounds good to me.

3. Currently you have to upload any files by selecting the repository and uploading from there. Can you expand a bit on how you'd like this to work? Do you mean something like an automatic synchronization between Moodle course files and the Sharepoint site?

4. To be able to upload, the user must have the "moodle/course:managefiles" capability in the course you're trying to upload to - you've mentioned the user is a manager in the course, can you confirm they have that capability?

Hope that helps!

- James

 
Average of ratings: -
Picture of Dario Züger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James

Thanks a lot for your answers. I have reinstalled my Moodle test environment with Moodle 2.7.4. Before I had 2.8.2. Now the the Managers can upload files to SharePoint from a course site. But the AzureAD sync is still not creating new users automatically. Do you have a suggestion what I could do?

To answer 3: I think it would be great, if the administrator could define in which repository the course files will be saved. So we could define that all the files go up to SharePoint. Our idea is to offer the best of both worlds (Moodle and SharePoint). If the teacher wants to work with Moodle, he/she can and if they want also to work with SharePoint, they will also see the Moodle files there. So every SharePoint subsite Moodle creates will also be a course/class site. I hope you understand what I mean.

 
Average of ratings: -
Picture of Dario Züger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James

Now also the AzureAD sync is working. There is a point missing in your documentation: https://docs.moodle.org/27/en/Office365
After adding permissions for SharePoint online und Exchange online on the AzureAD configuration page you also have to change the permissions for Windows Azure Active Directory. You have to activate the "Read Directory data" value there.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Thanks Dario! You're correct - I've updated our docs.

 
Average of ratings: -
Picture of Stephen Knott
Re: OneNote, Office365 and MS Mix Plugins now available
 

Could you be more specific about which options need to be set to read directory data? Is this under the Moodle app and then app settings or delegate settings or both?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Stephen - These permissions are the "Delegated" permissions that are set in Azure for the Moodle application.

 
Average of ratings: -
Picture of Tomi Kontio
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello

I would like to get a clarification about question and answer #2. Is it possible to use Sharepoint site other than the root site? Everything works well if I tell Moodle to create sites to https://ourtenant.sharepoint.com/ but course sites will not be created to SP if I try to use https://ourtenant.sharepoint.com/courses/. There are no warnings or other signs that this setup wouldn't work. In fact o365-plugin setup in Moodle says that site is valid and everything is fine. Also the problem is not with user rights since I can log in with API-user and create the same sites manually. So basically I want my coursesites from Moodle to be in 1 site collection and subsites under 1 site but not directly on root site. 

Is this kind of setup possible at all?

Best regards,
Tomi

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Tomi,

Yes this is actually the intended setup (to have Moodle as a site collection and courses as subsites under that). Do you get any errors in the cron when setting up Sharepoint to use a subsite for Moodle?

If you create the subsite manually (as you mentioned the system api user can), can you then use that subsite successfully?

 
Average of ratings: -
Picture of Roger Emery
Re: OneNote, Office365 and MS Mix Plugins now available
 

Does this require Moodle to be installed on an Azure server? or can we continue on our LAMP build and hook up to this set of plug-ins?

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Neither set requires Moodle to be installed in an Azure server.

The Office365 set of plugins require an Office365 for Business subscription for the organization. It pulls its SSO info from the Azure Active Directory (AAD) information used by the O365 subscription.

The OneNote set does uses OneNote personal accounts, so it does not require the O365 subscription.

The Oembed requires no extra accounts.

mike

 
Average of ratings: -
My mug
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Well done, Mike, and all at Remote Learner who worked on this.

I was contacted about this integration by a journalist from an IT magazine in Australia, so clearly this is catching people's attention.

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Thanks Michael.

It was (and still is) a great collaborative effort with Microsoft Open Technologies. And they are committed to continuous maintenance on the plug-ins as well as improvements, new features and more plug-ins.

mike

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Moodle Tracker for Office365 for Business plugins - https://tracker.moodle.org/browse/CONTRIB/component/14932

Moodle Tracker for OneNote plugins - https://tracker.moodle.org/browse/CONTRIB/component/14931

Moodle Tracker for Oembed filter - https://tracker.moodle.org/browse/CONTRIB/component/14933

 
Average of ratings: -
Picture of Leon hedding
Re: OneNote, Office365 and MS Mix Plugins now available
 

I also have done the install of these plugins. It seems to have gone pretty smoothly. I did have to manually enable the OneDrive for Business repository as that was not done.

My issue is that for some reason none of my users are getting synced. I have manually run the cron job and this is my output. I have 5000 users, but none of these users get imported.

Execute scheduled task: Sync users with AAD.
... started 14:46:01. Current memory use 5.2MB.
... used 0 dbqueries
... used 0.044241905212402 seconds
Scheduled task complete: Sync users with AAD.

I am attaching an image showing no users getting imported.

A second question then is, will there be any way to not sync certain users based upon a customattribute or office attribute value?


 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Leon -

Under "Local plugins", look for the "Microsoft Office 365 Integration" plug-in settings. There is a check box there to synchronize users from AzureAD.

The "OpenID Connect" was made to be generic outside of Office365, so that any auth system that uses OpenID Connect can use it, so we kept the AAD-specific stuff out of there.

Regarding your second question, no, that is not currently possible (I believe). But I am adding it to our "feature consideration" list.

mike

 
Average of ratings: -
Picture of Leon hedding
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thanks for your speedy response. I believe I already have the box ticked that you describe under "Local Plugins -> MS Office 365 Integration" 


I had it ticked already when I reported the issue.

I thought I would add a 3rd question. We have these 5000+ students that we want to sync. We have already synced them using an LDAP sync. Is there going to be any easy way to merge the old and new accounts if we switch to using O365 logins so that the end result is not 10,000 user accounts and everyone having two user accounts?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Leon - is your cron running? The checkbox enables syncing, but it actually happens during cron run.

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 
The issue on how it handles pre-existing LDAP versions of the AD sync'ed accounts is a bit of a problem for us, too. It's a good first step to allow the user to link an LDAP-synced account to an O365 account, BUT...


...when the account gets unlinked, the interface doesn't revert back to LDAP authentication: the only choice is manual login. So the account is then synced with neither system.


The resultant confusion for large quantities of users in trying to do this makes it impossible to deploy at this point. Too bad! This is an awesome set of plugins.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Thanks for bringing this to my attention - I've added an issue to our backlog to look at reverting to previous login method rather than manual.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

The latest version of the plugins provides a way to revert to the old authentication method the user was using - can you upgrade, try it out, and let me know whether it works for your use case? Thanks!

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Leon,

Doing some planning regarding your second question (syncing certain users based on custom attributes). Can you provide me a little more information on your desired use cases? 

My thoughts are that this would be useful in cases where you have a large AzureAD directory of users, and different logical subsets, some which would need Moodle access and some that wouldn't - i.e. syncing all users from a particular department/city/etc to Moodle. Is that what you had in mind?

Thanks!

- James

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

I like this a lot. We maintain the grade level of our students in AD and we could use this to sync particular grade levels based on their current level of instruction. If they aren't ready from an instructional standpoint for these tools we can limit their access to them.

Great idea!!

-Erick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Erick - What would you like specifically regarding this feature? Currently the plan is something where you could sync all users with a specific value for a field over to Moodle, and anyone without that value wouldn't be synced. It sounds like you might want additional actions to take place depending on the field/value? 

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

The option to choose a specific attribute and value would be handy, but if you choose a mandatory attribute and value that is fine too.

i.e. only sync if one of the extensionAttribute's equals "MoodleSync"

If the above is the case I can write a simple loop script to look for the users of a particular grad year and assign the attribute. So, either way is completely fine.

Also, this sounds like a good feature, but is far from crucial, how about my authentication proposals down made some ways down? Any thoughts?

Thanks again! Your work is generating a lot of popularity around here. There's rising fanfare for some of the proposed changes among our districts Technology Integration Coaches.

-Erick

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

James, this is awesome that you're working on this functionality!! This was one of the first things I looked for after installation, too. 

Here's our current use scenario: 

1. We create users in our local AD and include student IDs in an AD field (e.g., "Postal code"). (The users then get synced up to Azure via DirSync.) To sync our users from our local AD into Moodle, we use the LDAP authentication plugin at /admin/auth_config.php?auth=ldap. In this LDAP plugin's configuration settings, we set field "ID Number" to pull the ID number from the LDAP field (e.g., "Postal code"). Then, when we import our classes from the SIS using a CSV file, the course registrations are tied to that "ID Number" (which, again, was synced in from the local AD's "Postal code" field). 

2. When we do an LDAP enrollment sync via /admin/settings.php?section=enrolsettingsldap, it uses the samaccountname from the AD LDAP query to determine who is in which course.

So...if we're going to sync in the accounts from Azure instead of AD (which I'd love to do):

1. Regarding #1 above, we need some way to configure the O365 plugin to tell it which fields in Azure to bring into which fields in Moodle. For instance, tell the O365 plugin to import the "Postal code" field in Azure into the "ID Number" field in Moodle. (Right now, for synced users, the O365 plugin populates Moodle's "ID Number" field with an O365 SID, making it unusable for anything else.)

2. Regarding #2 above, since the the Azure plugin populates the ID Number with a SID from Azure, I haven't figured out how to use the AD LDAP enrollments yet. I imagine that the LDAP enrollments would work with Azure-synced accounts if there was way to fill in the ID Number with our own data instead of a hardcoded import of the SID code.

Does that makes sense? Hopefully...let me know if not, and I'll take a second stab at it.

 
Average of ratings: -
Picture of Mark Fritz
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike,

I've successfully got the O365 plugin working which is great and have 2 questions.

1) Is it possible to use our federated ADFS login page directly instead of going via windows.login.net?

At the moment this results in users having to log in twice to get into Moodle, first with their username at windows.login.net which then redirects and then their username/password at the ADFS landing page.

2) I can browse OneDrive for business and insert files into course. I will have a lot of staff interested in working with this. Is it possible for these files to be rendered inline via O365?

For instance if I select to link to a Word document it would be great if it can display within Moodle when a user clicks on it. At the moment all the files want to download (at least on my test machine)

This would make group editing a lot easier as well.


Thanks for all the work I've been waiting for a plugin like this


 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Mark -

Are your users using the "Office365 Login" link on the Moodle login page (see image)...

Office365 login page

Also, if they login to their Office365 account first, then they can be automatically logged into Moodle via the URL "[yoursite]/auth/oidc/". You can create a Moodle App on the Office portal page that redirects there as well.

As far as embedding a document in Moodle, SharePoint/Onedrive can provide an embed code that you can use as the URL. I'm looking into where that information is.

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Right. I found the embedding option...

If you open an Office document using the online application (e.g. Word Online), then there is a "Share" option under the "File" menu. One of the "Share" options is "Embed". If you select that, it will give you HTML code that will allow the document to be displayed in the page.

In Moodle, as an example, create a "Page" resource. In the editor, make sure the content is set to allow you to insert HTML code directly. Then paste in the embed code you got from the Word Online menu.

When you display that resource, the Word document will open in an iFrame within the page.

mike

 
Average of ratings: -
Picture of Mark Fritz
Re: OneNote, Office365 and MS Mix Plugins now available
 
Hi Mike,

Yes I tested using the office 365 login link that comes up.

It does do single sign on for domain joined systems and if you have logged into another service but moodle is usually the first one we sign into.

We are moving BYOD and trying to reduce the number of login prompts students are faced with on non joined laptops and devices and have had great success with this behind the web application proxy roll in server 2012R2.

Is there a setting in the azure app to redirect the auth link to our adfs login page? 

Thanks for the info on the embed code, I'd forgotten about that.

Mr Mark Fritz
IT Systems Manager

smallemailsignature926e79

MERICI COLLEGE

Wise Street, Braddon ACT 2612 | GPO Box 154, Canberra 2601
ph: (02) 6243 4100 | fax: (02) 6243 4199

twitter4d0e8b   homepage_30db5377

 

 


On 5 Feb 2015, at 3:34 am, Mike Churchward <noreply@moodle.org> wrote:

Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
by Mike Churchward - Thursday, 5 February 2015, 3:03 AM
Group DevelopersGroup Particularly helpful MoodlersGroup Testers

Hi Mark -

Are your users using the "Office365 Login" link on the Moodle login page (see image)...

Office365 login page

Also, if they login to their Office365 account first, then they can be automatically logged into Moodle via the URL "[yoursite]/auth/oidc/". You can create a Moodle App on the Office portal page that redirects there as well.

As far as embedding a document in Moodle, SharePoint/Onedrive can provide an embed code that you can use as the URL. I'm looking into where that information is.

If you reply to this via email, don't include a quoted copy of this post.


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Mark - Looking into how we can handle federated login pages and I've added it to our issue backlog. Will update when I have more information. Thanks for bringing it to my attention!

 
Average of ratings: -
Picture of Jeff Lyle
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

I am looking at potentially using the auth plugin and am in an federated environment, I believe I will be affected by the same behaviour as Mark - non-domain machines will get directed to MS login Portal which then after a username is provided redirects on to our adfs proxy, which is undesirable.

Did you get a chance to follow up on this - sorry I trawled through a lot of the post and looked through blog posts and couldn't find an answer sad

Could I use a different auth plugin (I believe there is a SAML plugin) to hook into my ADFS and then use the rest of the O365 plugins with this?


Thanks in advance.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Federation and/or auto-appending the domain is in the planning stages right now. For your situation, if you have another auth plugin that will work, you can still use Office365 functionality by connecting a Moodle account to Office365 without using login. On the user's profile page, there are two Office365/OpenID connect profile fields. One will show a link to use OpenID Connect to log in, the other just says "Connect to Office365". Following this link (and the "Connect" link on the page it brings you to) will allow a user to connect to an Office365 account, without switching their Moodle authentication method. They will have to go through the MS login portal when connecting, but with this process, it's a one-time thing, afterwards the communication is Office365 is all in the background (and their Moodle auth method remains unchanged).

Does that help?

 
Average of ratings: -
Picture of Anthony Connor
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

The profile fields don't appear to have installed correctly for me, users don't see the O365 fields in their profiles. The localo365manage and authoidcmanage fields do appear in the 'Other fields' list in site admin -> users -> accounts -> user profile fields. I get errors if i try to edit these settings for authoidcmanage i get 

Notice: Undefined property: stdClass::$defaultdata in /var/www/...../moodle/user/profile/definelib.php on line 548 

and for localo365manage i get

Warning: require_once(/var/www/...../moodle/user/profile/field/o/define.class.php): failed to open stream: No such file or directory in /var/www/...../moodle/user/profile/definelib.php on line 538 Fatal error: require_once(): Failed opening required '/var/www/...../moodle/user/profile/field/o/define.class.php' (include_path='/var/www/...../moodle/lib/zend:/var/www/...../moodle/lib/pear:.:/usr/share/php:/usr/share/pear:/var/www/...../moodle/lib/google') in /var/www/...../moodle/user/profile/definelib.php on line 538


I have installed the latest plugins and i am running 2.8.6. Any ideas on this error?

Anthony

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Anthony,


The problem is a row missing in a table, I had the same problem when I install the pluggings. If you want  I can send you the insert statement later.

 
Average of ratings: -
Picture of Anthony Connor
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mauricio,


Thank you for your reply, if you could post the insert statement that would be great.


Anthony

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 


Anthony this is the statement.

INSERT INTO `moodle`.`mdl_user_info_category`

(`id`,

`name`,

`sortorder`)

VALUES

(1,

'Other fields',

1);


I also have to execute two alter because there where errors in the log about  overflow:


ALTER TABLE `moodle`.`mdl_auth_oidc_token` 

CHANGE COLUMN `scope` `scope` VARCHAR(1000) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NOT NULL DEFAULT '';


ALTER TABLE `moodle`.`mdl_local_o365_token` 

CHANGE COLUMN `scope` `scope` VARCHAR(1000) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NOT NULL DEFAULT '';



Mauricio.

 
Average of ratings: -
Picture of Anthony Connor
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mauricio,


thanks for the INSERT command, it did the trick, those fields appear in user profiles now and the user's 365 repository is available and usable.


the other commands gave sql syntax errors but i haven't noticed any of the overflow errors you mentioned either.


Anthony

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Anthony,


Glad to read that it worked, previously I asked for help here for the same mistake but nobody could help me. I was lucky to have a backup of the database with the version that had those fields.


Mauricio.



 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi There,


We have encountered a somewhat similar issue. When certain users attempt to access the one drive for business repository via Moodle they get a database error.

I turned on debugging which produces the error below. It is happening to some users and not others. I was wondering would someone be able to advise?

Thanks in advance,

Darren


Column 'refreshtoken' cannot be null INSERT INTO mdl_local_o365_token (user_id,resource,scope,token,expiry,refreshtoken) VALUES(?,?,?,?,?,?) [array ( 0 => '11', 1 => 'https://studentncirl-my.sharepoint.com', 2 => 'AllSites.FullControl AllSites.Manage AllSites.Read AllSites.Write MyFiles.Read MyFiles.Write', 3 => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL3N0dWRlbnRuY2lybC1teS5zaGFyZXBvaW50LmNvbSIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzZlZGI0OWMxLWJmNzItNGVlYS04YjNmLWE3ZmQwYTI1YjY4Yy8iLCJpYXQiOjE0Mzg5NTAzMzgsIm5iZiI6MTQzODk1MDMzOCwiZXhwIjoxNDM4OTU0MjM4LCJ2ZXIiOiIxLjAiLCJ0aWQiOiI2ZWRiNDljMS1iZjcyLTRlZWEtOGIzZi1hN2ZkMGEyNWI2OGMiLCJvaWQiOiIzOTIyNmQ0ZC02Yzg0LTQ4ZDgtYjY1ZS04MDI4YzVhZjk5NjAiLCJ1cG4iOiJkb25laWxsQHN0YWZmLm5jaXJsLmllIiwicHVpZCI6IjEwMDNCRkZEODZBNkEzMjMiLCJzdWIiOiJhS283X1JBSVhZTWNVekFnbERGTy1MMk5yNUxxMDBtMW44Ry0ySXlieDVRIiwiZ2l2ZW5fbmFtZSI6IkRhcnJlbiIsImZhbWlseV9uYW1lIjoiT1x1MDAyN05laWxsIiwibmFtZSI6IkRhcnJlbiBPXHUwMDI3TmVpbGwiLCJhbXIiOlsicHdkIl0sInVuaXF1ZV9uYW1lIjoiZG9uZWlsbEBzdGFmZi5uY2lybC5pZSIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0xODYxMDM4ODAwLTExODAyNDM4MTMtMTU0Mjg0OTY5OC05Njc5IiwiYXBwaWQiOiIyMjZlN2E3ZC0yYjlmLTRlYjktOTU2NS1jNDU2ODhiNGRhODAiLCJhcHBpZGFjciI6IjEiLCJzY3AiOiJBbGxTaXRlcy5GdWxsQ29udHJvbCBBbGxTaXRlcy5NYW5hZ2UgQWxsU2l0ZXMuUmVhZCBBbGxTaXRlcy5Xcml0ZSBNeUZpbGVzLlJlYWQgTXlGaWxlcy5Xcml0ZSIsImFjciI6IjEifQ.W55XJSgYUNZHmZXxyBIfPse6lWRLGQ7oaXQE31WpRCKUpsov26ZfuUdT4Vg8K1kmY_L6GpzS9_JLm7ACvaEUyNct7J-0A7IfDZjHjApvB1qozNIkFQvEvzyAN86sv9E0jqKGROdWNMDHDZiEjO4g6iXtZ4baAlrndghPTF-A26heqych6Mb3jhkvfSy9b0tRxM2vHSW0OTQnxKdc4-7MtTNYopJDOVcMP93gwT7y1b7JjY4wThH9r0KVhpYVmIiVV-XdXOV0I-cUhyI-obLaI2P18JPjQD5ayRzhkktirVpioocGbGHLQfnyM7N6w3cs3hEYcJTDBV946S2EDrbp-A', 4 => '1438954238', 5 => NULL, )] Error code: dmlwriteexception
Stack trace:

* line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 285 of /local/o365/classes/oauth2/token.php: call to mysqli_native_moodle_database->insert_record()
* line 191 of /local/o365/classes/oauth2/token.php: call to local_o365\oauth2\token::store_new_token()
* line 150 of /local/o365/classes/oauth2/token.php: call to local_o365\oauth2\token::get_for_new_resource()
* line 81 of /repository/office365/lib.php: call to local_o365\oauth2\token::instance()
* line 173 of /repository/office365/lib.php: call to repository_office365->get_onedrive_token()
* line 100 of /repository/repository_ajax.php: call to repository_office365->get_listing()

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

HI,


I found problems when the user is created by Azure AD synchronizing.


Mauricio.

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

HI,


I found problems when the user is created by Azure AD synchronizing.


Mauricio.

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mauricio,

Many thanks for the reply, Did it affect the users accessing their onedrive?

Thanks and regards,

Darren

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Darren,

Can you post the versions of the plugins you're using? Are you using the most up-to-date ones? There was a bug that caused this in earlier versions.

Thanks, James

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Thank you for taking the time to reply. As far as I know I have the most up to date, I only added them last week. I have included the plugin versions below. If there is anything else that I can provide that may help troubleshoot this, I can provide it no problem. Thanks again for the reply I really appreciate it.

Best,

Darren 

Microsoft Office 365 Integration
local_o365
Additional201501271628.0.0.9
OneDrive for Business
repository_office365
Additional201501270428.0.0.4EnabledSettingsUninstall
OpenID Connect
auth_oidc
Additional201501271128.0.0.8EnabledSettings
Required by: repository_office365, local_o365



 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,


I was wondering would you have any idea what this could be?


If not there are no worries, I will troubleshoot further on my end and post if I find a solution.

Best,

Darren 

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

It looks like the issue is being caused by the refresh token. I was wondering would anyone know is there a way to send a new refresh token?

Thanks,

Darren 

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Interestingly, I logged into Moodle with  Azure Active Directory admin and I was able to access the access the one drive repository without issue. Could there be a simple permissions setting that I am missing?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Darren,

A couple question to help investigate:

It's possible there's a permissions issue - are any missing permissions reported if you use the permission checker tool in the "Microsoft Office 365 Integration" local plugin settings page?

- How was the user that experienced the error created? i.e Were they synced from Azure AD using the user sync feature? Were they created by logging in to Moodle with AzureAD? Were they an existing Moodle user that was linked to an Office 365 account?

- You mentioned some users could access OneDrive and some users could not - are there any differences you can think of between these two sets of users? Were they created in different ways?

Thanks!

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 
Hi James,


When the user was created by AzureAD, there is not  token on local_o365_token. I store a new token for that users in moodle\local\o365\classes\oauth2\token.php

Code for store new token

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mauricio,

Thank you for the reply. I was wondering did this solve the one drive issue? Forgive my ignorance but I was wondering could you advise further on how to store the token for the user in the moodle\local\o365\classes\oauth2\token.php file.

Thanks and regards,

Darren 

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

I don't know if this solve the onedrive problem, because i changed the file before check the OneDrive service. In my moodle OneDrive repository works fine.


With the change in token.php, the token is stored automatic if the user doesn't have one. I had problems with the calendars service when the user doesn't have a token stored, maybe is the same for onedrive.


Try using my file.


Mauricio.

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mauricio,

Thank you for taking the time to reply. I'll test your file and revert.

All the best,

Darren 

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

I hope you are well, and thank you for the reply. My initial inclination that the admin accounts appeared to have some special permissions appears to be wrong. It seems to be random now as to what users can access their one drive. This would see to match what Mauricio is saying below.

Best regards,

Darren 


 
Average of ratings: -
Picture of Thomas College
Re: OneNote, Office365 and MS Mix Plugins now available
 

We initially put Office 365 integration on our Moodle site last year.  We did not set users to use Office 365 authentication, but instead allowed users to connect their existing accounts with Office 365 if they wished to do so.  At the time of initial integration, everything seemed to work properly.

Now when users attempt to access certain Office 365 features, they are unable to do so.  For example, when a users attempts to access Outlook Calendar sync settings, they receive the following error: 'Exception - No token available for user #'.  I enabled logging for the local Office 365 plugin, and receive the attached errors.  It seems that the user's token has expired, but I'm not sure how to renew it.

All plugins are up to date.  The Microsoft Office 365 Integration health check tool comes back OK.  An Azure AD permissions check comes back OK as well.  We're running Moodle 3.0, MS Server 2012R2, MS SQL Server 2014, PHP 5.6.

Has anyone experienced this problem before?  If anyone has any insight on how to fix it, it would be appreciated.

Thanks 

Picture of Angel Arias Sastre
Re: OneNote, Office365 and MS Mix Plugins now available
 

I just installed new updates, and the plugin  local_o365 shows the error:


Excepción - No token available for user #2


Debug info: 
Error code: generalexceptionmessage
Stack trace:
  • line 54 of \local\o365\classes\feature\calsync\main.php: Exception thrown
  • line 485 of \local\o365\classes\feature\calsync\main.php: call to local_o365\feature\calsync\main->construct_calendar_api()
  • line 467 of \local\o365\db\upgrade.php: call to local_o365\feature\calsync\main->create_outlook_calendar()
  • line 539 of \lib\upgradelib.php: call to xmldb_local_o365_upgrade()
  • line 1628 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 434 of \admin\index.php: call to upgrade_noncore()

whats the problem?


Thanks


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Angel - is this user using a linked account connect or are they logging in to Moodle with their Office 365 account?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Can you have one of the users experiencing the problem refresh their Office 365 connection? From the Microsoft block, click "Edit settings", then in the green box on the right-side of the next screen, click the "Refresh connection" button. Let me know if that resolves the error - otherwise I'll continue investigation.

 
Average of ratings: -
Picture of Jeff Lyle
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hey James,


Thanks for your reply. Could I clarify to make sure I am following:

  • Continue using existing auth method, ultimately this leads to account records created in Moodle.
  • Office 365 plugins can be used to connect these Moodle accounts to Office 365. (probably some token stored in Moodle user account record) This occurs via user driven process that essentially runs through Office 365 Login process, and is a one time process per user account.
  • after which a user logs into moodle using the auth method in first bullet, and behind the scenes moodle logs into office 365 (using token it has stored)

I hope I have this correct as it sounds like a pretty good compromise until federation is better supported. It is also great to hear that support for federation is planned for, I was getting worried that it wasn't.

Thanks for releasing to the community and thanks for the hard work.


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Yes that's correct, any existing Moodle account, using any other authentication method, can be connected to Office365 using a one-time process where the user logs in to Office365. After they're connected, the user can use any other authentication method.

 
Average of ratings: -
Picture of Rob Whittaker
Re: OneNote, Office365 and MS Mix Plugins now available
 

This is a real huge pain, I am on Moodle 2.8 trying to update the plugins, all seemed to go well until the last o365 plugin update, I go through the update plugin page and get the following message. 

local_o365

Exception - No token available for user #2

More information about this error

Debug info:
Error code: generalexceptionmessage
Stack trace:
  • line 54 of /local/o365/classes/feature/calsync/main.php: Exception thrown
  • line 489 of /local/o365/classes/feature/calsync/main.php: call to local_o365\feature\calsync\main->construct_calendar_api()
  • line 467 of /local/o365/db/upgrade.php: call to local_o365\feature\calsync\main->create_outlook_calendar()
  • line 539 of /lib/upgradelib.php: call to xmldb_local_o365_upgrade()
  • line 1628 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 434 of /admin/index.php: call to upgrade_noncore()

And now I am stuck in this eternal loop between trying to upgrade the Moodle database and then because I get this error I get thrown back to the plugin update page. 

Please provide explicit details on how to fix this above error when trapped in this moodle plugin update loop. How am I supposed to know on this page who User #2 is without going into phoMyAdmin? 

Anyway user #2 is the built in Admin account on my Moodle instance, it is a local account and does not use any Office 365 credentials to login, although it has connected in the past that functionality has been removed. Any help appreciated. the more specific and detailed the better.

My plugin reads

Local plugins
Microsoft Office 365 Integration /local/o365 Additional 2015012745.03 2015012751
  • Moodle 2014111000
  • auth_oidc (2015012728)
To be upgraded
Office 365 Integration /local/office365 Additional 2015012706 2015012731
  • Moodle 2014111000
  • auth_oidc (2015012728)
  • block_microsoft (2015080421)
  • local_o365 (2015012751)
  • repository_office365 (2015012721)
  • filter_oembed (2015012711)
To be upgraded

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

We are currently working to migrate O365 from trial to production and I think these tools will be of immense help to ease the transition and will allow teachers and administrators to see the vast benefits that can be reaped from O365, but as of now there are a few quirks that keep us from rolling this out immediately. 

I'm no developer so I might be making some tall orders here, feel free to put me back in place.

Currently we are using LDAP authentication and that is what our users are used to. They are also used to the standard UN/PW fields and will resist change. We are seeking a noninvasive integration approach. To achieve this it would be much easier to make the auth change on the backend and let them sign in as if nothing has changed. It's important to note that we use MS's AD sync tool for O365 so everyone's credentials are the same for machine login, Moodle login, and O365 login (appended with the domain of course for O365). What would make our lives easier is if the the auth method could be changed to OpenID while maintaining the use of the standard login fields. These fields then pass the credential to O365 for login there. In essence, SSO through Moodle rather than through O365. It would be easier to inform our users that they need to add our domain name to the end of their user name rather than click the link at the bottom and use a completely different, unknown portal. Alternatively, if in the plugin config we could set some kind of optional domain name appendage the users could log in as they normally would, and the plugin would tack on the the domain name in the background and pass all the data to O365 for its authentication.

We also have an issue with the fact that a personal Microsoft account is required for students and teachers to work on and grade/give feedback in OneNote respectively. It would be easy to hastily slander this decision, but I'm sure this was by design for some reason. Could you please explain? This is a serious hindrance for us the K-12 business.

We have a couple teachers testing the functionality of the the OneNote Class Notebook Creator, and this has proven to be a strong tool that acts similarly to your submission and feedback notebooks. Full integration with Moodle, Class Notebooks, and SharePoint would bring these tools together in a very robust and usable manor.

As for the OneDrive for Business repo, it would be nice if a user had the option to log into their OneDrive even if they weren't logged in using an organizational account through OpenID. Most other repos display a "login to your account" button that could be very helpful in this case to give users access to their OD4B even if they use a manual or LDAP account.

Overall, a great framework, and a lot of hard work that has produced some phenomenal tools. The oEmbed Filter is awesome, the O365 SSO is a work of art as well, it just wont rate highly with our users in it's current state.

Thank you for what you do!

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Erick -

Thanks for your comments!

Regarding your authentication issues, and use of LDAP, etc... We are looking at improving and simplifying the entire user management / authentication pieces and your comments are valuable. I will have our developer chime in here a bit more about this.

Regarding using a personal account for the OneNote piece: currently the OneNote integration is with OneNote Personal; not OneNote for Business. We are working with Microsoft on a OneNote for Business plugin that will use the same authentication as the O365 integration, but we are waiting for the API's to be available from Microsoft. This is planned to happen before end of 2nd quarter 2015 though.

The OneDrive for Business repo is designed to work only with the O365 organizational account. This is its intent. But, Moodle still has a OneDrive Personal repository that is in core that can be used in conjunction with the OneDrive for Business repository.

Please, keep feeding back!

mike

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Mike,

Thank you for the fast response!

I'm excited to hear back from your developer, because the authentication really leverages the usability of the entire system

As for OneNote, that is a great time frame! We wouldn't expect to make a widespread implementation until the fall of the new school year. So having these tools available by June would give our staff the time to get up to speed on the advancements made.

Lastly, The OD4B issue could be remedied with some of your improvements and simplifications to the user management / authentication side of things so I will hold out for news of those changes and see if I still have anything to gripe about.

Thanks for listening!

-Erick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Erick,

Thanks for the feedback - Some interesting ideas here! 

Regarding authentication and user management. I'm going to do more research on exactly what we can accomplish, but I first wanted to clarify the exact end goals you have in mind. I thought of two scenarios:

1) You'd like to use AzureAD on the backend for user management and have a login process using a username and password on the front-end. AzureAD users would be able to use the Office365 features as they can now, authentication/user management would be performed using AzureAD, but the Moodle-side user interface would be a more traditional username/password-based process.

2) You'd like to use the Office365 features without having to change the authentication method. This would still require an AzureAD user for each Moodle user using Office365, but users would not have to log in through AzureAD each time they visit Moodle. Users would go through a one-time process to "link" a Moodle account to an AzureAD account to be able to use the Office365 features, but could continue logging in however they choose. This would decouple login method and availability of  Office365 features.

If neither of these are quite what you're looking for let me know, the solution (at least from a technical perspective) would be quite different.

Thanks!

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

I think your first solution would work best. We want to add features without changing function. So in short, yes we want to maintain the current user interface, or at least a more traditional user interface.

Careful consideration and planning would make this a seamless change. If we could simply change the authentication method for individuals, groups, or all users completely under the table they wont need any specific instruction in order to "unlock" the new tools we can present them with.

Put simply, it is my understanding that currently, using LDAP authentication, a user enters their UN and PW on the standard login page and this is what Moodle does:

  • checks the DB for the user
  • checks to see what form of authentication is enabled
  • if manual auth check PW against DB entry
  • if ldap use the connector and preconfigured AD settings to check PW against that in AD
now if OIDC acted similarly nothing would change for our end users aside from the Moodle experience waiting for them on the other side. Some careful consideration and planning has prepared us for an easy transition. Our O365 logins are exactly the same as those for Moodle with the addition of an "@domain". If we simply had the option to append every user name with a string, i.e. our domain, within the OIDC settings in Moodle then our users would see absolutely no changes in logging in.

If the user has to be bounced around a couple URI's while being authenticated that's completely fine, and understandable, just so long as the traditional form is functional for users.

Out of curiosity does this coincide with any of the improvements that Mike hinted at? Or I'm I bringing something new to the table?

Many thanks,

Erick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Erick - Working on improving authentication and providing more options, and looking specifically at your proposed flow - stay tuned for more news coming on this soon!

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Erick's workflow would be good for us, too. Nothing confusing.

Do you think this would help to fix the official Moodle mobile authentication? When a user account is linked to Office 365, they can't authenticate on the mobile client.

Is it possible for the server to handle the O365 handshakes instead of giving that responsibility to the user's browser? That may be easier in the long run.

 
Average of ratings: -
Picture of Mike Landis
Re: OneNote, Office365 and MS Mix Plugins now available
 

In our environment we would like to use the second option.  We don't want to change authentication methods away from LDAP.  I actually am not so interested in SSO as long as a user doesn't need to log in more than once to O365 during each Moodle session. 

All we are needing to do at the present time is figure out how users can use their Onedrive for Business filestores to upload assignments to Moodle from that source.   This is particularly important for iPad users, who can't download the files from OneDrive to their iPads and then from there upload them to Moodle to post to assignments.  This is a very critical function, and the only functionality we are interested in implementing at this time.

It may sound weird, but doing something as simple as asking users to log in to Moodle in a different way is very problematic in our environment. Right now, they type their username, and there's only one place to enter it when logging in to Moodle.  So changing authentication methods is not a viable option for us at the present time unless it could be done totally seamlessly with only one place to enter in a username (with no @contosco.com domain), and have it work for local and AD users both, the way the current authentication / login process method functions for users.





 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike,

I just wanted to clear up a few things. I do not think you completely understood me in my suggestion. My users would also have panic attacks if they were all asked to change how they log on. Even if the only change was to ask them to add the schools domain name after their username. I'm with you 110% there. I also seek a completely seamless, behind the scenes change of auth method if going with the first option. This would require an option within the plugin for the domain name.

To illustrate this....

We would setup the plugin with all the options including the domain name appendage contosco.com.

Little Johnny is used to logging in with his student id (12345) and password (P@ss)

Under my recommendations nothing changes. Johnny still enters 12345 and P@ss, but little does he know he's not being auth'ed through LDAP (Johnny probably doesn't even know what LDAP is, he just wants to get on Moodle), in fact his UN is appended with @contosco.com and the whole credential is bundled and passed to O365 for authentication. He might notice that he is bumped from page to page (while being auth'ed by MS), but the input is normal, and the end result is normal; he still reaches the landing page after being successfully auth'ed.

I think we want the same thing, an easy transition; more features, and no hassle for the end user regardless of how far you take the new integration.

Thanks for chiming in!

-Erick

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 

Mike,

Your second paragraph describes something that I am particularly interested in (accessing OneDrive through the FIle Picker repository system) - as I have a good bit of control over our Moodle site but none in our O365 for Business implementation. Although I can make suggestions to those that do.

I may not have enough information handy to ask my question correctly, but...

There is no way to implement the O365 for Business Repository without AzureAD, right? My K-12 district has Office 365 for Business - but I've been told that we won't be switching to AzureAD. Our Moodle (2.8.3) uses LDAP authentication and - as far as I know - we use "plain" Active Directory. We have been using Moodle for several years have had great success incorporating other repositories (personal OneDrive, DropBox, Google Drive, etc), but it sounds like we may miss out on the O365 for Business set of plugins.

I am (obviously, I'm sure) not a sysadmin or technician - although I do sort of manage our Moodle instance. I do not have the say-so on adopting Azure.

Any input is appreciated. I am registered for an upcoming webinar from RL.

Thanks,

David

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi David - 

Currently you do need to log in to Moodle using AzureAD to use the OneDrive for Business repository - we're using AzureAD to connect to Office365. We are currently looking at providing more options to connect to Office365, including allowing users to maintain their existing Moodle authentication method. Stay tuned for more news on this!

Thanks,

James

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 

Sounds great - thanks, James. Plus, I just found out thta we will be moving to AzureAD sometime over the Summer.

David

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

Maybe I am mistaken, but I have not had good luck connecting a user to the OD4B repo without first using O365 to login.

I will note one caveat to this. If I convert a user to OIDC auth, login using O365, then move them back to LDAP auth they remain connected to O365 interestingly, and therefore also maintain access to the OD4B.

See the attached screenshots and you'll see that they do not log in with O365, but are connected to the service, and the user has the ability to access their OD4B as well.

-Erick



 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Erick - Yes the OIDC login gets access tokens from AAD and stores them in a separate table. These tokens get refreshed every time the user logs in using OIDC. If you convert the user back to LDAP like you're doing in the hack you posted those tokens will remain associated with the user so they're able to access resources. The tokens do have an expiry date though so while this will work now, it won't work indefinitely. Like I mentioned though, we're working on method to get this kind of setup working.

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

Thanks for the clarification! I'm sure that info could have been deduced from the code, but you make it quite a bit easier! Glad to hear that those advancements are in the works too.

-Erick

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

When the improvements come along I know it wont matter, but I got curious and found the tokens in the database. If I were to extend the expiry date would the plugin complain or detect the change, or could I theoretically run a query that would update that field for all of the active tokens extending their connection to O365 for say the remainder of the school year or term while maintaining LDAP authentication?

Thanks for humoring me.

-Erick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

That field is just a local cache of the expiry date so we know when to refresh. The real expiry happens on the office365 side, so updating that field won't make the token work after the expiry date.

 
Average of ratings: -
Picture of Roger Emery
Re: OneNote, Office365 and MS Mix Plugins now available
 

I watched the webinar - terrible presentation!

Are you aware of any other presentations/videos out there?

Just looking for something more succinct without all the umming, ahhhing, coughing, waffling and forgetting the script to share with senior management. That was not it!



 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Roger -

Your criticism of the presentation style aside, what was missing from the webinar that you were looking for?

mike

 
Average of ratings: -
Picture of Roger Emery
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike,

I'm trying to get together a good succinct overview of the opportunities this integration offers.

However due to its nature I cannot build a working dev version to demo without a fully working microsoft environment to connect to. We do have 365 here, but at present fairly limited rollout (student have mail only at present) and I'm not sure our ICT dept would be happy to let me just hook up to a live environment and see what breaks.

So ideally some good picture sequences or short slick videos of the functionality. I can build words upon words with some screen captures, but for those less interested in the technical aspects and more interested in what it can practically offer to enhance workflows and student experience something to see in action I find is the better way to help understanding.

I realise this isn't always the top of the list in an open source community where it may be in a commercial organisation with profit to make.

Alternatively if there is a dev environment available somewhere that I could access then I could get someone here to create some videos.


Roger

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Roger -

You could start with the blog posts I did, starting here - http://tandl.churchward.ca/2014/10/onenote-surface-and-moodle.html, and work your way through the others. They're short, but they do have some key info.

There is also the MoodleDocs:

We are developing some marketing materials but we don't have them ready yet. I can let you know when we do have them posted.

mike

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

James, your second solution is great.

I did notice that when decoupling an entire user account using the profile linking tool, the user account drops back to manual login, even though the account started out as an LDAP authentication. This kind of puts a roadblock on using this tool for us. Can you store the original authentication method and decouple back to that? Or else have a default admin setting to pick the fallback authentication mechanism when decoupling a Moodle account from Office 365?

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

SCS LMS,

That's a good suggestion, I'd like to second it. In my testing I ran into the same issue, and was forced to manually change the auth method in the DB.

In /auth/oidc/auth.php I was able to hack in a couple of changes to the disconnect function so a decoupled user would by default return to LDAP authentication, but It's certainly not a perfect solution.

-Erick

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Erick, would you please share your hack for this? Without that, I really can't use the plugin. Thank you!

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

A few things before I get into my changes...

  1. Do you have a great many users to change back? This is not an ideal solution for that. If you have a large group of users I would use a DB query to change them back to LDAP. Very easy query. Let me know if you need any help with it if that seems to be a better route to take.
  2. This does not add functionality, it completely changes it. If you have any users that were manual auth before than this will break those accounts. The changes described will not add the option to revert to LDAP auth but will force it.
  3. No matter if you have the user make the change on their own, or if you log in for them, or as an admin you log in as them, they still need the Manage OpenID Connect Connection permission. Rather than give an entire existing role this right I created a new system role dedicated to this purpose and assigned the role on a per-need basis.
Now to get into it. I would copy and paste all edited files and save them as name.ext.bak just in case anything goes terribly wrong. Even though we are only messing with the code for a plugin, I prefer to be safe ;)

Edit /auth/oidc/classes/form/disconnect.php.

Comment out the following two lines:

$mform->addElement('passwordunmask', 'password', get_string('password'));
$mform->addRule('password', null, 'required', null, 'client');

Edit /auth/oidc/auth.php. All changes are to the disconnect function.

The following if block:

if (is_enabled_auth('manual') !== true) {
    throw new \moodle_exception('errorauthmanualplugindisabled', 'auth_oidc');
}

should read:

if (is_enabled_auth('ldap') !== true) {
    throw new \moodle_exception('errorauthldapplugindisabled', 'auth_oidc');
}

After if (empty($fromform->password)) { comment out:

throw new \moodle_exception('errorauthdisconnectemptypassword', 'auth_oidc');

After // Update user comment out the following lines:

$updateduser->auth = 'manual';
$updateduser->password = $fromform->password;

At this point you should be able to bounce back and forth between O365 authentication and LDAP authentication freely.

I hope this helps. Let me know if I can be any more clear. Let me know if any issues arise!

-Erick

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

This worked great. Thank you!

I kind of think this is sort of a necessary thing to build into the PHP. 

Maybe before the merge the plugin could store the username and authentication type, and then look that up before decoupling.

Wow, this tool really has potential. Big potential.

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Slight update...

After the v27.0.0.2 release about a week ago there's one small change to this hack.

After // Update user do not comment out the following line:

$updateduser->auth = 'manual';

Rather, simply change 'manual' to 'ldap'.

These apps are bound to change immensely in the near future. Please take caution when making changes to the code, I cannot guarantee reliable function of the plugins considering the pace at which they are changing, and you can only hold yourself liable for anything that breaks ;) Also, given the rate of change, this is my last update on the matter.

From the sounds of it, this hack will become ancient history as the committed dev's are working to make our wishes reality, but until that day comes feel free to use the above!

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

As of now AD logons, and subsequently Moodle logons, are done using a students ID number. Originally we were going to maintain this going to O365, but this causes some real life issues with ID number anonymity and as a result the ID will not appear anywhere in the UPN of the students. So with this change it effectively ruins my suggestion of passing the old username to O365 for sign on (with the appended domain). It's also dawned on me that there is more support for your second option already. So I would like to hop on the bandwagon and express my interest in your second solution.

As the thread is getting longer it's also getting harder to keep up with references to old posts so here is an excerpt from your post that I am making mention to:

You'd like to use the Office365 features without having to change the authentication method. This would still require an AzureAD user for each Moodle user using Office365, but users would not have to log in through AzureAD each time they visit Moodle. Users would go through a one-time process to "link" a Moodle account to an AzureAD account to be able to use the Office365 features, but could continue logging in however they choose. This would decouple login method and availability of  Office365 features.

I think this would be a great solution that would cause minimal overhead to most school districts and universities. Why change what already works if we can just "link" it in.

Again, many thanks!!

-Erick

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Erick, isn't that what this does? /auth/oidc/ucp.php The problem in my case (as I mentioned earlier) is that decoupling from this doesn't drop the user back to LDAP (thus your hack).

I'd like to see something a little simpler here to encourage uptake of Office 365 throughout our school: the user clicks "Log in with Office 365" and then the plugin finds an existing Moodle account for that user and merges them automatically (very cleanly, without destroying data in fields imported from LDAP).

It's a little confusing for former LDAP/O365-migrated users if they don't realize that they can't log in with the name and password blank on the Moodle homepage anymore. Even though there's a big link to log in with O365, they still enter their username and password, and then get rejected. They get frustrated and quit, when all they had to do was click the link for O365 logon. Maybe if they enter their credentials and Moodle finds they are an O365 user they will send them over to O365 for authentication rather than attempting to process the logon and erring out.

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 
SCS LMS,

Just to be clear, because my message ended up so far below James' message that I was replying to and landed just below yours, I was changing my preference from James' first suggestion to his second.

Originally I was pretty hard headed about making a change to OIDC, but not requiring users to use the link at the bottom of the page to log in. Ergo, they would still use the default form, but the creds would be passed by MS for auth'ing. That was when we were using our students' ID's as their UPN. So the suggestion was to configure the appendage of the domain name in the plugin and then it would be a seamless transition for the user. They would enter their ID, the plugin would append the domain and pass the cred to MS. This was perfect until anonymity was called into question. Anything that is public to the district must not contain student ID's because we've had issues with ID hijacking, and basically early onset identity theft (as humorous as it sounds).

So now that the Moodle UN and the O365 UPN are different I've changed my stance to the one-time linking of a Moodle account to the Azure account without regard to the auth method originally used by the users. Thus, fully decoupling login method and availability of Office365 features. I also noticed that more people on the thread agreed with this stance, and interoperability among the entire community is key. This appears to me to be the absolute best way to integrate without making heavy changes to the communities' Moodle setups as they currently stand.

How do you feel?

-Erick

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

I've already posted twice in this thread, so this will be my last one for now.

We have LDAP sync enabled, so our users are already in Moodle. The users exist in Azure, too, since DirSync sends them there. However, when a user who has been logging in for some time on LDAP comes to the Moodle home page and test out the O365 login, they are logged in with a new user account built from their Azure authentication. Pretty confusing for the users! So I haven't been able to enable this yet. Am I missing something?

Since the user accounts in our local AD (used by LDAP) have a UPN that gets sent up to Azure as a an email address, can the O365 auth plugin in check for an existing account already before it creates one? If it finds one, it can take them straight to the account linking page at /auth/oidc/ucp.php, where the user can elect to link the accounts. Maybe there's a better way (probably is!), but this is the first thought that came to my head.

(Then give them a clean way to decouple back to LDAP authentication instead of manual accounts.)

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

SCS LMS,

I know that this function already exists. It lives in /auth/oidc/auth.php and is called "handlemigration". I've seen this work first hand in my testing only one time. The first time I logged in through my own O365 login the plugin recognized the existing account and merged them, but sense then throughout my testings I've had difficulty reproducing the results.

Not quite sure what I'm missing...

-Erick

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

It would be extraordinarily helpful if this were working.

I'm guessing that this has to do with the usernames somehow.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Good thought on looking up users by email address and linking them from there - We're currently working on a number of improvements around authentication and I'm going to explore adding this. Thanks!

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Using Safari, the redirect back to /auth/oidc/ comes in on an SSL connection and raises the warning:

"This is a non-secure form". The page it's going back to is http:// rather than https://. I went into the Azure control panel and set the application's SSO reply URL to https://, but it sends me back to Moodle site without logging me in, saying, "OIDC id_token not received." And there are no styles on that page either.

The majority of our computing environment is Mac, so they'll be getting this warning. It doesn't come up in Google Chrome.

Any ideas?


 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi There,


I was wondering did you ever get this sorted? currently have the same issue sad


Any help at all would be greatly appreciated.


Thanks,

Darren

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Darren, 

In your Moodle config.php file, is the wwwroot set to http://.. or https://...?

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Many thanks for taking the time to reply. It is set to https://

Best,

Darren

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

I got this sorted, I was doing something extremely stupid, I add inputted the wrong secret key!

Best,

Darren 

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Not a problem - glad you sorted it out!

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

All,

For anyone else closely watching the development of these plugins, or those with authentication suggestions, check out and keep up with this new thread dedicated to Office 365 authentication improvements:

https://moodle.org/mod/forum/discuss.php?d=281746

Thanks again Mike, James, and the rest of the team at Remote-Learner!!

-Erick

 
Average of ratings: -
Picture of Stephen Knott
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,

These are fantastic plugins and will really help to complete our students' online experience.

We are however having an issue with the Sync users option.

We are running Moodle 2.8.3 with the latest versions of the plugins but find that the cron task will only attempt to sync 200 users. Is this a limit of AzureAD basic, the plugins or something else?

Hope you can help!


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Stephen 

There's no hard-coded limit of 200. Can you answer some questions to help me figure out what might be going on?

- How many users do you have to sync?  

- Are you able to see cron logs? Do you know if the cron is reporting any errors? 

- If you run the cron again does it sync the next 200?

 
Average of ratings: -
Picture of Jordan Lavergne
Re: OneNote, Office365 and MS Mix Plugins now available
 

I am experiencing the same thing with the sync not working.   I am trying to sync roughly 1000 users.  Cron appears to stop after 200 errors though.   Cron keeps trying to syn and sometimes it get a new one in, but it keeps failing on the same users.  

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 
I tried to update the plugin, but I get this (2.8.0):


UPGRADING TO NEW VERSION

auth_oidc

Unknown DDL library error


More information about this error


Debug info: Field auth_oidc_state->additionaldata cannot be added. Not null fields added to non empty tables require default value. Create skipped

Error code: ddlunknownerror

Stack trace:

line 526 of /lib/ddl/database_manager.php: ddl_exception thrown

line 49 of /auth/oidc/db/upgrade.php: call to database_manager->add_field()

line 537 of /lib/upgradelib.php: call to xmldb_auth_oidc_upgrade()

line 1626 of /lib/upgradelib.php: call to upgrade_plugins()

line 434 of /admin/index.php: call to upgrade_noncore()


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Looking at this - upgrades and new installs are working for me, but I'm pursuing a potential cause/fix. Before I make any changes, can you give me some information? 

If possible I'd like to know the type of system you're running on (windows/linux) and the type of database (mysql/mariadb/etc). Also, were you just upgrading from the last version of the plugin or an older version?

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

I'm running:

  • Moodle 2.8
  • MySQL 5.5.41
  • Ubuntu 14.04.1 and PHP 5 (not that these last two would make a difference)

I updated Ubuntu and I upgraded Moodle to 2.8.5+, but the problem persisted under the upgrades, too.

I tried to uninstall all the various plugins, but a whole bunch of them appear to be a one-way street---there's no uninstall option in the plug-in management tool. If I could have uninstalled them, I would have, so that I could at least update my other plugins. But I can't. Are you going to add uninstall options for all these bits and pieces?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Okay thank you - I have a potential fix for this. Are you installing from github or the Moodle plugin database?

As for uninstall, we're not preventing uninstall intentionally, it's unfortunately caused by the plugin dependencies - Moodle won't let you uninstall a plugin that another plugin depends on. We're looking at ways to get around this, and I'm told Moodle is looking at ways to improve this as well.

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thanks, James. I'm using the Moodle plugin database.

I've deactivated everything I'm able to deactivate and uninstalled as many layers of plugins as possible, but I still can't get rid of the plugins. Once you install them, are they thereafter permanently locked in so that you can't remove them? 

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

I've released an update into the plugin database for the OpenID Connect plugin that was causing the problem. Please let me know if this solves your issue.

I'm going to look further at what can be done about uninstall. As I mentioned it's an issue with dependencies, but nothing that can't be fixed either with a change in our dependencies or a Moodle update that would handle uninstall better. So while you may not be able to uninstall right now, it's not a permanent thing and is something we want to address in an update soon.

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

That worked, James. Thank you!

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

James, I installed the plugins right off the bat and it seems the oldest ones won't go away. Can you please let me know how to get rid of these old versions?

Plug-ins that can't be uninstalled

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi SCS,

Those are all the current versions so everything looks good! If the version was what concerned you - the version number contains the date of the original release for that Moodle version (2.7, 2.8, etc), not the date of the current release of the plugins.

I am aware of the missing uninstall link though - this is an issue with Moodle's uninstall requirements that I'm trying to work around. Will post when that is resolved.

Thanks,

- James

 
Average of ratings: -
Picture of Stephen Knott
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,

Basically the issue is that we have over 1000 users to sync over and after doing a bit of testing and adapting your plugin I can see that the query results are being paged. Azure AD is returning 200 users and then a 'next page' link that could be used to get the next page of 200 users.

Does this make sense? 

Stephen

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Stephen - That makes sense, I've created a task over here to fix this. Thanks for looking into this!

 
Average of ratings: -
Picture of Stephen Knott
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Has there been any progress with getting the 'paging' sync sorted?

Is it something related to our AzureAD and is there anything we can do to change it?

Thanks,

Stephen

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

I'm working on this right now actually. Expect this to be in our next release on May 4.

 
Average of ratings: -
Picture of Stephen Knott
Re: OneNote, Office365 and MS Mix Plugins now available
 

Awesome ! Thanks James!

 
Average of ratings: -
Picture of Grant Stone
Re: OneNote, Office365 and MS Mix Plugins now available
 

I am having an issue with the setup of the Microsoft Office 365 Integration plugin. In Settings, I entered in a URL in the SharePoint Link field. I have tried URLs to both an existing site and a new site. In all cases, when I Save the Settings, I see a spinning progress indicator with message that reads "Moodle is setting up this SharePoint site."  This message never goes away. I assume something is hung as I do not see any evidence in Sharepoint that anything has been changed/added.

Does anyone know how to resolve or investigate further?

 
Average of ratings: -
Picture of Grant Stone
Re: OneNote, Office365 and MS Mix Plugins now available
 

I believe my issue is solved. My cron was not completing so it never got to create Sharepoint sites. Once cron ran successfully, SharePoint course sites were created.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Grant, glad to know the issue was resolved. Yes the cron does need to run to set up SharePoint - sorry if it's a little confusing, I'll see what I can do to clarify how that works.

 
Average of ratings: -
Picture of Peter Sercombe
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,

Sorry to bring this one up again - having a similar issue of my own. Continually getting a spinning icon as below:


Cron is currently set to run every 2 hours (we've got 6000+ users in our AzureAD) - so I wondered if this may have something to do with it.

The sharepoint sites are being setup successfully as far as I can tell. The only issue would seem that a student user can't seem to access a course's associated sharepoint site. It would seem that permissions are not syncing to the sharepoint site. Is this the desired behaviour? Or should students have access to the site?

I'm a bit stuck on where to start looking for a solution to this one.

We were using the Microsoft Graph API and syncing groups, but have subsequently disabled the groups syncing (as all the groups created were public, and I'd like to find a way of making them private before rolling that out).

I have just (as of a few minutes ago) disabled the use of the Graph API as well in case that's the issue.

By the way, I'm a massive fan of this plugin set/integration. Combined with the OneNote and Office Mix LTI tools it's an enormous value add.

EDIT:
Moodle version 2.9.3
local_o365 plugin version 29.0.0.20

 
Average of ratings: -
Picture of Peter Sercombe
Re: OneNote, Office365 and MS Mix Plugins now available
 

Update:

It would seem that the spinning wheel has resolved itself.

However, students are still not given any permissions to access content on the sharepoint sites that are created.

For example, if I add a file from the document library to the course and set it to "Create an alias/shortcut to the file" the students cannot access the file. Seems somewhat counter intuitive.

Is this the expected behaviour of the plugin, or have I come across a bug?

 
Average of ratings: -
Picture of Peter Sercombe
Re: OneNote, Office365 and MS Mix Plugins now available
 

I think I may have just found the answer to my question: https://github.com/Microsoft/o365-moodle/issues/115

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello again,

I've just updated to the most recent versions of the plugins for Moodle 2.7, and I've run into a error. I'm not sure if it's my own error, an issue with Moodle, an issue with the plugin, etc., but I want to make James aware, and see if anyone else is experiencing anything similar.

System info:

Ubuntu 14.04

Apache 2.4.7

MySQL 5.5

PHP 5.5.9

Using PHP-FPM

Moodle 2.7.1


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Erick,

Just to clarify - this happens when you first visit the settings page? I'm not seeing that error on my site over here. Could you try purging your Moodle cache? Can you enable developer debugging (or check your server logs) and get more information on the error? 

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

You are correct. This happened after updating the very first time I visited the settings page. I removed the plugin manually and reinstalled to avail, purging Moodle cache had no effect, and attached is the info I believe you're looking for.

Thanks,

Erick


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Thanks Erick, I see what's going on now. One of those things that shouldn't happen but did. Glad things are working on your end, I'll see what we can do on our end for the next release to help prevent this sort of thing.

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

I apologize for any confusion. Things currently are not working on my end. Am I up a creek until the next release drops then? Or is there any troubleshooting you'd recommend to get me back on my feet until that time comes?

Thank you James.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Erick - I've made a small change to the local plugin and released a new version. Can you upgrade and let me know if it gets things working for you? Thanks.

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Looks good now! Thanks for the incredibly fast response time! You couldn't have made things any easier for me!

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

I've ran into another hang up now unfortunately. While configuring local_o365 I am unable to successfully check permissions in AzureAD. I get the following warning:

To fix this automatically, your system API user must be an administrator, and the "Access your organization's directory" permission must be enabled in Azure for the "Windows Azure Active Directory" application.

My API user is a global admin and my Moodle app in AAD has the delegated permission "Access your organization's directory" for WAAD. I think I'm missing something here. Can you spot my error?

Thanks again!

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Any suggestions? This issue is still present...

-Erick

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Erick -

James is away until April 13. He'll look back at it then.

mike

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thanks for the update Mike!

-Erick

 
Average of ratings: -
Picture of Rico Sandmeier
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike and James

i wa also trying to Setup the plugins, but we get also the API Error and i check all these boxes in azure:

permissions

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

Rico,

Did you ever resolve this issue? I'm still looking for a solution to this issue...


James,

Any suggestions here? I've updated to the most recent versions of the plugins, but still this issue persists.


Thanks all.

-Erick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Erick,


I have an issue in our backlog to look at this. I've experienced this intermittently - does this happen at the time for you? Any additional details you might have are always helpful.


Thanks

- James

 
Average of ratings: -
Picture of Erick Christian
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

Unfortunately I don't have many more details for you. This issue has been present for me from the first day that button was added to the plugin, and has not ceased with any subsequent upgrade to the plugin. I've provided my system info previously (and nothing has changed), but I can provide it again if you think it will shed any light here.

Do you know if this is actually hindering any sort of use, or is it simply a nuisance?

Again,  many thanks

-Erick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Thanks Erick - 

This will not cause any problems with the plugins or affect any other functionality. That button is a tool to assist setting up permissions for the application registered in Azure. If you've followed the setup instructions and set up the permissions as outlined at https://docs.moodle.org/27/en/Office365#Configure_application then everything will work as expected. 

This button's function is to check the configured permissions and offer to correct them if needed.

- James

 
Average of ratings: -
Picture of Matthew Hull
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James/ Mike,

I am also having the same problem as Erick with the API user permissions. I have checked and double checked with our Office 365 Admin and the permissions are setup correctly as per the documentation and we see the same error. The API user is an admin in both Moodle and the AAD app in O365 too.

Can i check would this error of permissions stop the users from being synced from Azure AD into Moodle? The CRON is running and does say 'Sync users with AAD' however, we don't see any new users created in Moodle at all?

I would be really grateful any help you can provide me in case i have missed something in the configuration.

Kind regards

Matt 

 
Average of ratings: -
Picture of john attwood
Re: OneNote, Office365 and MS Mix Plugins now available
 

Does anyone know the sequence of the plugins to install in order to get OneNote working ?

I completed the API registration with MS but it take 24 hours before it activated.

Can I start installing the plugins or do I have to wait the 24 hours. 

I assume there are dependencies of these plugins but does anyone have chart of dependencies there are so many plugins !


So far I've attempted install a few of the local plugins associated with OneNote but they failed...???



John




 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi John -

You can get the list of all of the plugins associated with the OneNote group here - https://moodle.org/plugins/browse.php?list=set&id=71

Any of the versions files will show you the dependencies, but for ease, install the local_msaccount first. Then the local_onenote.

Then you can install the block, repository and assignment plug-ins.

And lastly, the local_microsoftservices plug-in.

When you say they failed, it should have provided an error message of some kind. If it was a dependency, it would have said that. Is that what you saw?

mike


 
Average of ratings: -
Picture of john attwood
Re: OneNote, Office365 and MS Mix Plugins now available
 
Debug info: 
Error code: err_response_empty
$a contents:
Stack trace:
  • line 175 of /admin/tool/installaddon/classes/pluginfo_client.php: tool_installaddon_pluginfo_exception thrown
  • line 58 of /admin/tool/installaddon/classes/pluginfo_client.php: call to tool_installaddon_pluginfo_client->validate_response()
  • line 302 of /admin/tool/installaddon/classes/installer.php: call to tool_installaddon_pluginfo_client->get_pluginfo()
  • line 43 of /admin/tool/installaddon/index.php: call to tool_installaddon_installer->handle_remote_request()
 
Average of ratings: -
Picture of john attwood
Re: OneNote, Office365 and MS Mix Plugins now available
 

I haven't installed plugins in a long time maybe there's something I forgot to do ? I'm just using the interface which takes me to moodle plugin site which eventually generates the install link on the second page I think. I click install and out spits that code with debugging on. 


This is a brand new install of 2.85 on  a Bluehost site. There's nothing on it. 


This is the one I used https://moodle.org/plugins/view/local_msaccount

 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Try uninstalling all of the O365 plug-ins and reinstalling them in the order I posted above.

mike

 
Average of ratings: -
Picture of john attwood
Re: OneNote, Office365 and MS Mix Plugins now available
 

Already done that it's still not working. I wonder if I should go back to 2.7 ? Have others got it working on 2.85 maybe it's the Bluehost install script. 

 
Average of ratings: -
Picture of john attwood
Re: OneNote, Office365 and MS Mix Plugins now available
 

Ok installed bitnami locally with a 2.85.1 stack of Moodle and installed the plugin first time. It must be something with the way I'm trying to install the plugin. I guess I need to manually copy the zip file up to Bluehost and try it. I will keep my fingers crossed. 

 
Average of ratings: -
Picture of john attwood
Re: OneNote, Office365 and MS Mix Plugins now available
 

Wow, I manually uploaded the file, overwrote the file that was (exact same file) in there and it worked ??? 

Go figure that out. I didn't check the permissions. But what I don't understand is the same file was in there but maybe it was assigned different permissions because it was a manual upload from the Bluehost Control panel file manager as opposed to inside the moodle interface. Go back to the inefficient way and it works. 


Thanks for your help Mike.


John

 
Average of ratings: -
Picture of john attwood
Re: OneNote, Office365 and MS Mix Plugins now available
 
Debug info: 
Error code: err_curl_exec
$a contents: Array
(
[url] => https://moodle.org/plugins/download.php/7943/local_microsoftservices_moodle28_2015012701.zip
[errorno] => 0
[error] => Failed to connect to 2400:cb00:2048:1::8d65:71b3: Network is unreachable
)
Stack trace:
  • line 391 of /admin/tool/installaddon/classes/installer.php: tool_installaddon_installer_exception thrown
  • line 319 of /admin/tool/installaddon/classes/installer.php: call to tool_installaddon_installer->download_file()
  • line 43 of /admin/tool/installaddon/index.php: call to tool_installaddon_installer->handle_remote_request()
 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Matthew,

The latest version of the plugins contains a lot of updates to the user sync code - can you upgrade and let me know your issue is resolved?

Thanks!

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello James,

I'm trying to do the Integration for my University, our office365 subscription is for education. I have problems To configure the O365 plugin, i can't set the System API User, because when i click on the "Set User" link, its redirect me to "https://login.microsoftonline.com" but when i log in i go back to the main page of moodle and the System API User is not setting.

Thanks in advance.


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Mauricio,

Has the OpenID Connect authentication plugin been installed and configured? (Entered a Client ID and Client Secret from Azure?). Are you using the defaults for the auth and token endpoints in the OpenID Connect auth plugin?

- James

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,


the problem was in the configuration, but now I get the following error:

Azere_error


azure_permisos


azure_permisos2

the account have full permissions in office 365 (sharepoint, onedrive, exchange).

And i have errors in the cron:


Execute scheduled task: Refresh system API user refresh token
... started 14:29:57. Current memory use 61.2MB.
... used 3 dbqueries
... used 0.89849305152893 seconds
Scheduled task complete: Refresh system API user refresh token
Execute scheduled task: Sync users with AAD.
... started 14:29:58. Current memory use 61.4MB.
No more users to sync.
Full user sync completed. Resetting saved state for new run.
... used 4 dbqueries
... used 2.5567419528961 seconds
Scheduled task complete: Sync users with AAD.
Execute scheduled task: Sync o365 events in to Moodle
... started 14:30:00. Current memory use 61.6MB.
Bad response received when fetching events.
... used 7 dbqueries
... used 39.325249910355 seconds
Scheduled task failed: Sync o365 events in to Moodle,Could not refresh token
Cron script completed correctly
Cron completed at 14:30:39. Memory used 61.8MB.
Execution took 55.191146 seconds

users from ADD are not created in moodle and the calendar events from outlok can't be updated in to moodle.


Thanks for your help.


-Mauricio

 
Average of ratings: -
Picture of Michael Perry
Re: OneNote, Office365 and MS Mix Plugins now available
 

Mauricio,

Old post but we have the same original problem as you in that when we try and set the system api account it just redirects to the profile page. What was the config change you did to fix that bit?

Oddly the rest works and we can sign on and access onedrive etc.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Michael, 

This is likely a recently identified bug. Please follow https://github.com/Microsoft/o365-moodle/issues/189 for updates. This should be fixed and released shortly.

 
Average of ratings: -
Picture of Alessandro Caviglione
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi guys,

I've just installed a fresh moodle 2.8 with local_o365 plugin.

All works great and I'm able to log in with an AzureAD account!

Now I just want to sync AzureAD account with moodle to create and populate cohorts for each course but when I enable "Sync users from AzureAD" and run the cron.php file, I receive this error a lot of times:

Could not create user with objectid xxxxxx-xxxx-xxxx-xxxx

This is strange because I see that about 180 users are successfully imported.

Any help?


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

HI Alessandro,

Do you receive any errors when creating users manually (Site administration > Users > Accounts > Add new user)?

You mentioned you see 180 users successfully imported, how many users are you attempting to sync?

 
Average of ratings: -
Picture of Alessandro Caviglione
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

sorry for delay.

No, error happens only with "Sync user from AzureAD" is enabled, in Azure AD we have about 400 users.

I've tried to analyze users to find a difference between one imported and the others but (apparently) there are no differences.

Strange thing that if a user that was not synced due to the error try to log into Moodle, it appear into the list of "local" users!


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Alessandro - 

The latest version contains a lot of updates to the user sync code - can you upgrade and let me know if the problem persists? 

Thanks!

 
Average of ratings: -
Picture of Alessandro Caviglione
Re: OneNote, Office365 and MS Mix Plugins now available
 

I'm sorry but... why OneNote plugin do not use OneNote Online from Office 365 suite???

OneNote plugins require Microsoft Account plugin that use MS Live accounts... why??


 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Alessandro -

The OneNote plugin was built to work with OneNote personal and not OneNote for Business. There is a plan in place to make it work for OneNote for Business, but that cannot happen until the API's are available. Microsoft is still working on getting the API's available.

mike

 
Average of ratings: -
Picture of Alessandro Caviglione
Re: OneNote, Office365 and MS Mix Plugins now available
 

Ok, thank you very much for your reply! smile

And... what about the error that happens during sync operation?

Any ideas?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

An update - OneNote/Office365 integration is currently being worked on and will be released soon. Thanks for the feedback!

 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

OK I have this working on a school districts tenant with azure. The user sync went and synced 192 users. All those users look like they came over just fine with all account information. I have the single sign on working through Office 365, One Drive for business works just fine as well. I have updated to the latest version of all plugins.


My problem is the tenant has 4,700 students and 500 teachers and it only synced 192 accounts. I ran cron several times and the first time I got a few of the errors that the other person stated in the cron log, but now I get no errors at all. Not sure what to try next.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi John,

First thing - are you running the latest version of the plugins? Last week's release fixed a bug that caused only 200 users to be synced.

If you are running the latest code, you're probably running into sync rate-limiting. To reduce site strain during syncs, we sync users in 200 user increments. Every time the sync task runs in the cron, the next 200 users are synced until they are all done. 

By default, this task runs once per day at 1am, meaning, by default, 200 users are synced per day. For a site your size this is clearly too slow, so you'll want to increase how frequently this task runs - see https://docs.moodle.org/27/en/Scheduled_tasks for information on how to do that. For this initial sync you'll probably want to run the sync operation every time the cron runs (unless your cron runs very frequently) - but be sure to reduce this frequency for on-going syncs to help reduce site strain.

- James

 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

OK well now that is weird. I went to change the schedule and no matter what I changed it to it would not sync any more users. Si I went back to the Office 365 plugin to see if it was working and sure enough there is now an error message that was not there before. So at this point everything checks out on the tenant, the health check says it can connect, everything is working except the application permissions section. Now in that section I get this error;

Office 365 Application permissions error 1

If I select the fix permissions button I get this;

Office 365 application permissions error 2


I checked Azure and even turned on ALL permissions to everything and no luck. Also to note this is my second Moodle server and the other one had no issue like this at all, running for several weeks on the older version of the plugin. I am no expert here but I think there is some bug in the newer version of the plugin. The sync is not running at all now and looks like some others have had this same error recently.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi John,

The issue you're seeing with the application permissions section has been reported by a couple other people as well. This is a tool to set up the required permissions in Azure automatically. If you've set up the permissions as outlined at https://docs.moodle.org/27/en/Office365#Configure_application, then this is not indicating a problem that would affect the user sync, it's just this tool having trouble checking for the permissions.

Next steps:

- Verify you are running v27.0.0.8 or v28.0.0.7 of local_o365.

- Can you post a screenshot of the Scheduled tasks page showing the "Sync users with AAD." task?

- Can you post the output of two successive cron runs showing the "Sync users with AAD." task?

- In Azure, go to Azure Active Directory, and click the directory where you've registered this application. Click the "users" tab and verify that the 4700 students you mentioned are in this directory.

This will help me diagnose what's occurring to prevent users syncing.

Thanks!

- James


 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

OK now looks like things are going. I shut down the server and restarted, and now when I run Cron it is batching over 200 at a time. Unfortunately it appears it lost its way from the very first sync so it duplicated 200 user accounts, and they are not in alphabetical order. So I had fun with the batch user tool and had to manually find all the dups and delete them. From here it appears it is back on track running 200 at a time.


One suggestion is we need an option to run a larger amount as a start up process, since I now am running cron jobs every minute to get things synced initially. My company is working with several school districts to set up Moodle services and this one is a small district. This is going to take a long time for a district of 30k students. I am not concerned with slowdown when we are initially setting things up since no one is using it now so what would be nice is to have an option to do a one time bulk upload of the whole Azure tenant, then set it normally for updates after that.


Also I am running v27.0.0.7 of local_o365 but all updates seem to have been applied so not sure how to get version .8. Still getting the other error messages as well.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

John - 

Thanks for the feedback, glad things are working for you. Good suggestion regarding an initial full sync, I've added a task to look at the best way to implement that. 

Regarding v2.7.0.0.8 have you installed the plugins from Github or the Moodle plugin directory? The newest version of local_o365 is available at https://moodle.org/plugins/pluginversions.php?plugin=local_o365 or https://github.com/MSOpenTech/moodle-local_o365.

Regarding the error for the application permissions tool. My investigation points to the problem being the display of the name of the missing permission - if you get that error you may still be missing permissions. Can you double check that the configured permissions in Azure match the permissions outlined in the documentation (https://docs.moodle.org/27/en/Office365#Configure_the_O365_plugin)? Once those are verified, if you are still getting the error, sometimes the permissions don't update immediately in Moodle. You can force a refresh by setting the system API user again - set it to the same user you set originally, just the act of setting it refreshes the tokens.

Thanks!

 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Well no such luck. I got the original plugins from the Moodle site, and I did an inplace update through the Moodle plugin update screen. I set file permissions on my server and lam letting Moodle do the updates.  I did get all users to sync so that part is working. Also confirmed that SharePoint services are working since I can access my OneDrive for Business as a user. Exchange sync is broken, since the error clearly says Exchange issue, and calendar sync is not working. Cron shows no errors.

I went back and deleted all the permissions and set them up exactly like the docs say. With those permissions you will get another error by the way. If you follow those permissions exactly you will get the following;

error 3

Now if you add the "access your organizations directory" permission that error goes away, but I am still stuck on the Exchange null error. I have tried every combination of permissions available, and even given ALL permissions in every category and no dice.


Also I reset the user, and put in another global admin account, nothing. Then went back to the original admin account and nothing. Everything else is working including SSO from Office 365 portal and the oAuth sign on from the front page. Somehow I am not getting proper Exchange permissions. While I can dismiss this for now, having the calendar sync broken is s show stopper for going live on this so I have to get this fixed.


Not sure if I should try and delete all the plugins and start over or if that will make it worse.

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

John, I just tried upgrading the plugins and had the same problem. I rolled back to a prior snapshot because it was freaking me out.

I don't use the Azure AD synchronization tool.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi SCS,

Just wanted to confirm - you mentioned you had the same problem - is it the same as appears in the posted screen shot? One "null" for Microsoft Exchange? It looks like the name of the permission that tool looks for has changed, so while the correct permission is set the tool is looking for the old name and can't find it - this will be updated in the next release.

You mentioned you don't use the AzureAD sync tool - is this the reason? are you experiencing other problems?

Thanks,

- James 

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi John,

It looks like the permission identifier the tool is looking for has changed - this will be updated in the next release scheduled for next week. You mentioned calendar sync is not working - do you mean that you cannot sync calendars or is that just based on this error? This error alone does not indicate calendar sync won't work.

Thanks,

- James

 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Ok you may be correct that the two issues are unrelated, but I did have calendar sync with the older version and I can say now that they users calendars are not syncing. For me everything is working except calendar sync, and I am getting that null error.


I see no errors in the Cron file also.

 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

I seem now to be moving backwards on this. Since my last server was only  test server I decided to wipe it all out and start over. Now I set up a brand new Moodle 2.9 server, and installed the plugins. I ran updates to make sure all plugins are at the latest. I set up 365 and everything went fine with no errors in configuration. The health check says it is fine.

Ran cron and it synced 200 users no problem. Ran cron again and I get a list of 200 errors. Cron looks like this.

cron listing

 Now any time I run cron I just get 200 errors, and I still have the same 200 users synced, with no additional ones added. Also as you can see cron is telling me the sync is complete and before it was telling me that it was partially done and was holding a place for the next sync. To keep from asking unnecessary questions, I have assigned rights in Azure until I am blue, and tried every combination known to man. I put the server in maintenance mode and restarted it. No luck.


Here is what I have for plugins;

 I know you guys are trying hard but this is getting to be pretty frustrating and starting to wonder if this is going to work at all. May need to punt and just start batching users in. Did something change here very recently?




 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

ok looks like the plugin is totally broken with 2.9. In addition to user sync not working, One Drive access and calendar access is also not working. Not seeing any error messages for those two, but you cant see your One Drive files. I guess I need to revert back to 2.8.

 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

ok went back to 2.8.5 and sync for users is now working, as is One Drive for Business. calendars are still not syncing and I still get that Exchange error in the plug in config so I think they are tied together. For now I am going to stick with this version and hope we get the calendar sync issues sorted out.

looks like some work will need to be done to get things working on 2.9.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi John,

Thanks for posting so much information, I have a couple answers:

- On the 2.9 front - there's not currently a 2.9 version of the plugins so it's quite possible a few things are broken there. 2.9 is quite new, and while 2.9 support is high priority, I can't yet claim 2.9 support. This is coming very soon however.

- For your tests on 2.8 - Thanks for posting the screenshots - the first problem I see here is the version of the plugins you have. The version of local_o365 shown in your screenshot is 28.0.0.3 - the current version is 28.0.0.7 as seen here: https://moodle.org/plugins/pluginversions.php?plugin=local_o365. There have been quite a few fixes and improvements since 28.0.0.3, including fixes for calendar and user syncing - which seem to be you two main problems. You did mention you ran updates and didn't see any... I'm not sure why that is as the 28.0.0.7 version of local_o365 is definitely on the plugin database (as seen in the link above). How are you running updates? If you visit the "notifications" page from the Site Administration menu do you see any indications of updates available? I see there's no indication of available updates on the plugins overview page - do you see anything when you press the "Check for available updates" button at the top of that page?


Thanks,

- James


 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Looks like for some reason the updates on 2.9 were not working correctly either. Honestly there are several things on 2.9 that are not working right so for now leaving that behind me. On my new 2.8.5 server I do have the latest updates but still no luck on the calendar working. Here is my current server, and I do updates through the system.

As I said earlier, using 2.8.5 everything seems to be working except calendar sync. I have all rights checked in Azure so not sure what is going on but that is the last thing to get fixed. Everything else works fine. Is there something else I can try? 


 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi John,


My Calendar now is working, with a trace I find a error:

{"error":{"code":"ErrorInternalServerError","message":"The time zone information is missing on the DateTimeOffset value '2015-05-19T21:49:20'. A DateTimeOffset value must contain the time zone information."}}

So, i change a line from the file: moodle\local\o365\classes\rest\calendar.php

Old Line New Line
$since = date('c', $since);                         $since = date('o-m-d\TH:i:s\Z', $since);



-Mauricio


 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hey Mauricio thanks for that information. Unfortunately that did not seem to work for me. I verified that the file has changed, restarted the server and manually ran cron several times and no luck. I see no errors in the cron log, and it does say that the calendar sync task ran but I still don't see my Moodle calendar events show up in Office 365. So far I only saw this work once, and from there never again.

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Please change the fuction get_events and execute the cron, now you will see the errors (>>>response=) in the cron log.


    public function get_events($calendarid = null, $since = null) {

        $endpoint = (!empty($calendarid)) ? '/calendars/'.$calendarid.'/events' : '/events';

        if (!empty($since)) {

            $since = date('o-m-d\TH:i:s\Z', $since);

            $endpoint .= '?$filter=DateTimeCreated%20ge%20'.$since;

        }

        //mtrace('>>>endpoint='.$endpoint);

        //mtrace('>>>calendarid='.$calendarid);

        $response = $this->apicall('get', $endpoint);

        mtrace('>>>response='.$response);

        $response = @json_decode($response, true);

        mtrace('>>>response='.$response);

        return $response;

    }


 
Average of ratings: -
Picture of Gabriel Kulevicius
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mauricio, 

Calendar and events syncro is working as expected, I only have problems with users syncro, that's the problem.

I tried with Tennant= xxxx and also xxxx.onmicrosoft.com but I received the same error message (Invalid domain name in the request url).

thanks

 
Average of ratings: -
Picture of Gabriel Kulevicius
Re: OneNote, Office365 and MS Mix Plugins now available
 

HI all, we are testing o365 plugins also, with some AAD Sync problems.

I installed last o365 plugins set with moodle 27 today cause this functionality was not working in my installation. I have only 10 users in my AAD and my o365 domain is provided by microsoft (xxxx.onmicrosoft.com, not a custom domain).

When \local_o365\task\usersync  task runs gives no error, so I tried adding a debug line 83 in local/o365/classes/task/usersync.php file:

print_r($users);

and it shows an API error that is not cached by the function:

Execute scheduled task: Sync users with AAD.
... started 17:48:06. Current memory use 29.8MB.
Array
(
    [odata.error] => Array
        (
            [code] => Request_BadRequest
            [message] => Array
                (
                    [lang] => en
                    [value] => Invalid domain name in the request url.
                )

        )

)
No more users to sync.
Full user sync completed. Resetting saved state for new run.
I can not solve where is my bad configuration, all other configurations are OK except local_o365 | detectperms, it gives me problems like other users in this forum, but I'm giving full permissions in Azure in order to make it work as a test application:


Any ideas about what is going wrong?

Congrats about the plugin set, 

best







 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Gabriel,

In the  local_o365 configuration,   Is your AzureAD Tenant = xxxx.onmicrosoft.com?

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

I solved the problem of synchronization, first i solve the problem with the token by setting again the System API User, but then few users users was synchronized. With a trace i could see that the problem was that the country returning by AAD,  It's the long name (ECUADOR) and table accepts only two characters so i change it with 'country' => 'EC' in the file moodle/local/O365/classes/rest/azuread.php. I know it's hard coding but it is the faster way to solved because i don't know the language and my proyect it's not on time.


By the way, with the latest version of the plugins i can't see the option for  Sync events between Outlook and Moodle.


perfil

-Mauricio.

 
Average of ratings: -
Picture of Ruth Canton
Re: OneNote, Office365 and MS Mix Plugins now available
 

Wanted to see how easy it was to install so I've just installed:

https://moodle.org/plugins/view/local_o365 

https://moodle.org/plugins/view/local_office365 

https://moodle.org/plugins/view/auth_oidc


Via the front end on my new 2.9 test platform before having access to any of our licence information and Moodle has broken.

Any advice.


 
Average of ratings: -
Picture of Mike Churchward
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Ruth -

Two problems -

  1. There is no working 2.9 release yet.
  2. You don't have all of the plug-ins you need installed yet.

There is a local plug-in called Office365 Integration which defines all of the necessary plug-ins, and if you use the Moodle interface to install it, helps you get all of the needed plug-ins. If you only manually installed some of them, there may be dependencies missing. Look at the plug-in list in the previous link and make sure you add the ones you haven't yet.

mike

 
Average of ratings: -
Picture of Irith Herman
תשובה ל: Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike

I used the Moodle interfaceand installed all the plugins that were in the list' I checked again and there is no missing plugin

Irith

 
Average of ratings: -
Picture of Ruth Canton
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thank you, such a clear response. I'll save this for when I'm allowed to install a plugin again!  I'd rather be using 2.8 or 7. I'm not being given a say or much control currently sad

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 

Mike,

Is there a roadmap of release dates that you can share? We are working on an update calendar for our Moodle instance and are considering "leapfrogging" and only applying major updates once per year, but would like to know that the O365 plugins would be supported.

Thanks!

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi David,

New features and bugfixes are added to the version of the plugins supporting the newest Moodle version, and bugfixes are backported to the last two supported Moodle versions. 

We are also supporting the 2.7 LTS version of Moodle as long as Moodle is supporting it (Until May 2017)

Hope that helps!

- James

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

It does - thanks! But does that mean that there are now plugins for Moodle 2.9? If not, how long of a lag is there between Moodle releases and matching Microsoft plugs? And will that period be consistent as new versions are released.

Thanks,

David

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

The 2.9 version is scheduled for this coming Monday - I try to get it out as close as possible to the Moodle release date.

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thank you - very good information that helps us set up our update schedule.

Thanks,

David

 
Average of ratings: -
Picture of Irith Herman
תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

Hi 

I installed all he plugin in my site and after the database updar I recieved a blank page .

After it I recieved emails from users who couldn"t create new courses in the site so I removed all the installation .

what can I do?

Irith


 
Average of ratings: -
Picture of Irith Herman
תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

I am using Moodle 2.7(I didn"t write it)Now I"m trying again

I installed OneNote and got blank page

I tuned on the debugger


Warning: require_once(/var/www/html/xxx/local/msaccount/msaccount_client.php): failed to open stream: No such file or directory in /var/www/html/xxx/local/onenote/classes/api/msaccount.php on line 30

Fatal error: require_once(): Failed opening required '/var/www/html/xxx/local/msaccount/msaccount_client.php' (include_path='/var/www/html/xxx/lib/zend:/var/www/html/xxx/lib/pear:.:/usr/share/pear:/usr/share/php:/var/www/html/xxx/local/mediacore/library') in/var/www/html/xxx/local/onenote/classes/api/msaccount.php on line 30


Irith

 
Average of ratings: -
Picture of Mike Churchward
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

The error message is telling you that you haven't installed the "/local/msaccount_client" plug-in. To install OneNote, you need to install of the plug-ins in the "Microsoft Services" set. If you are installing from the Moodle UI, the easiest way to do this is to install the Microsoft Services local plug-in. This plug-in is a shell plug-in that will identify all of the other plug-ins that need to be installed based on dependencies.

mike

 
Average of ratings: -
Picture of Irith Herman
תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

I Installed all the OneNote plugins and now when I want to go on installing I get an error

עזרה עם Install plugins from the Moodle plugins directory
Capability "repository/onenote:view" was not found! This has to be fixed in code.
  • line 389 of /lib/accesslib.php: call to debugging()
  • line 1150 of /repository/lib.php: call to has_capability()
  • line 3286 of /repository/lib.php: call to repository::get_instances()
  • line 109 of /lib/outputcomponents.php: call to initialise_filepicker()
  • line 147 of /lib/form/filepicker.php: call to file_picker->__construct()
  • .....................................line 183 of /lib/pear/HTML/QuickForm/Renderer/Tableless.php: call to MoodleQuickForm_filepicker->toHtml()

 
Average of ratings: -
Picture of Mike Churchward
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Hi Irith -

Did you complete the installation by going to the Admin page? The capability that is missing is installed when the OneNote repository is installed. The error message is indicating the capability wasn't installed, which would mean either the OneNote repository wasn't completely installed or some error occurred preventing it from being installed.

If you feel everything was installed correctly, then you may need to uninstall everything and re-install.

mike

 
Average of ratings: -
Picture of Chester Folming
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike

I get the same:

Capability "repository/onenote:view" was not found! This has to be fixed in code.

  • line 389 of /lib/accesslib.php: call to debugging()
  • line 1150 of /repository/lib.php: call to has_capability()
  • line 3278 of /repository/lib.php: call to repository::get_instances()
  • line 341 of /lib/form/editor.php: call to initialise_filepicker()
  • line 183 of /lib/pear/HTML/QuickForm/Renderer/Tableless.php: call to MoodleQuickForm_editor->toHtml()
  • line 2777 of /lib/formslib.php: call to HTML_QuickForm_Renderer_Tableless->renderElement()
  • line 403 of /lib/pear/HTML/QuickForm/element.php: call to MoodleQuickForm_Renderer->renderElement()
  • line 1632 of /lib/pear/HTML/QuickForm.php: call to HTML_QuickForm_element->accept()
  • line 1696 of /lib/formslib.php: call to HTML_QuickForm->accept()
  • line 1675 of /lib/pear/HTML/QuickForm.php: call to MoodleQuickForm->accept()
  • line 435 of /lib/pear/HTML/Common.php: call to HTML_QuickForm->toHtml()
  • line 204 of /lib/pear/HTML/QuickForm/DHTMLRulesTableless.php: call to HTML_Common->display()
  • line 923 of /lib/formslib.php: call to HTML_QuickForm_DHTMLRulesTableless->display()
  • line 310 of /course/modedit.php: call to moodleform->display()

I followed your advice, and got this:

There is a request to install plugin Microsoft OneNote (repository_onenote) version 2015012701 from the Moodle plugins directory on this site. However, this plugin is already installed on the site.


I believe I installed all the plugins in the pack, none of them lists any additional requirements..


 
Average of ratings: -
Picture of Chester Folming
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

Fresh install - same issues

I just did a fresh install of Moodle 2.8 current version. Moodle 2.8.7+ (Build: 20150723)

Installed all office365 OneNote plug-ins again and got the same errors.

/admin/repository.php?sesskey=69Lxm5Tks2&action=edit&repos=onenote

Throws this:

line 1150 of /repository/lib.php: call to has_capability()line 85 of /admin/repository.php: call to repository::get_instances()


/course/modedit.php?add=assign&type=&course=13&section=1&return=0&sr=0

Creating an assignment in a random course, throws this four times:

Capability "repository/onenote:view" was not found! This has to be fixed in code.

  • line 389 of /lib/accesslib.php: call to debugging()
  • line 1150 of /repository/lib.php: call to has_capability()
  • line 3278 of /repository/lib.php: call to repository::get_instances()
  • line 341 of /lib/form/editor.php: call to initialise_filepicker()
  • line 183 of /lib/pear/HTML/QuickForm/Renderer/Tableless.php: call to MoodleQuickForm_editor->toHtml()
  • line 2777 of /lib/formslib.php: call to HTML_QuickForm_Renderer_Tableless->renderElement()
  • line 403 of /lib/pear/HTML/QuickForm/element.php: call to MoodleQuickForm_Renderer->renderElement()
  • line 1632 of /lib/pear/HTML/QuickForm.php: call to HTML_QuickForm_element->accept()
  • line 1696 of /lib/formslib.php: call to HTML_QuickForm->accept()
  • line 1675 of /lib/pear/HTML/QuickForm.php: call to MoodleQuickForm->accept()
  • line 435 of /lib/pear/HTML/Common.php: call to HTML_QuickForm->toHtml()
  • line 204 of /lib/pear/HTML/QuickForm/DHTMLRulesTableless.php: call to HTML_Common->display()
  • line 923 of /lib/formslib.php: call to HTML_QuickForm_DHTMLRulesTableless->display()
  • line 310 of /course/modedit.php: call to moodleform->display()
/admin/plugins.php

Throws this:
line 407 of /lib/outputrequirementslib.php: call to page_requirements_manager->jquery_plugin()line 26 of /local/o365/settings.php: call to page_requirements_manager->jquery()line 67 of /lib/classes/plugininfo/local.php: call to include()line 489 of /admin/settings/plugins.php: call to core\plugininfo\local->load_settings()line 6758 of /lib/adminlib.php: call to require()line 470 of /lib/classes/plugininfo/base.php: call to admin_get_root()line 1292 of /admin/renderer.php: call to core\plugininfo\base->get_settings_url()line 372 of /admin/renderer.php: call to core_admin_renderer->plugins_control_panel()line 207 of /admin/plugins.php: call to core_admin_renderer->plugin_management_page()

All of this in developer debug mode.

/admin/settings.php?section=local_o365

Under "Setup" everything is "green".

Can anyone point me in the right direction?

Would love to have this integration running.

 
Average of ratings: -
Picture of James McQuillan
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Chester - 

What happens when you do to /admin/index.php?

 
Average of ratings: -
Picture of Chester Folming
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 
Nothing .. no notifications, see attached. And the check at /local/o365/acp.php?mode=healthcheck is positive..

 
Average of ratings: -
Picture of James McQuillan
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hmm, can you post the version of each plugin you're using?

Specifically: 

local_onenote

repository_onenote

local_o365


but if you can get the versions for all the Office365 plugins that would be helpful.

Thanks,

- James

 
Average of ratings: -
Picture of Chester Folming
Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

Assignment / Submission plugins
OneNote submissions
assignsubmission_onenote
Additional 2015012702 28.0.0.2 Enabled Settings
Required by: local_microsoftservices, local_office365
Assignment / Feedback plugins
OneNote feedback
assignfeedback_onenote
Additional 2015012703 28.0.0.3 Enabled Settings
Required by: local_microsoftservices, local_office365
Blocks
OneNote block
block_onenote
Additional 2015012702 28.0.0.2 Enabled
Required by: local_microsoftservices, local_office365
Text filters
oEmbed Filter
filter_oembed
Additional 2015012701 28.0.0.1 Enabled Settings
Required by: local_microsoftservices, local_office365
Authentication methods
OpenID Connect
auth_oidc
Additional 2015012711 28.0.0.8 Disabled Settings
Required by: profilefield_oidc, repository_office365, local_o365, local_office365
Profile field types
Office365 Connection
profilefield_o365
Additional 2015012702 28.0.0.2
Required by: local_office365
OpenIDConnect Management
profilefield_oidc
Additional 2015012702 28.0.0.2
Required by: local_office365
Repositories
OneDrive for Business
repository_office365
Additional 2015012704 28.0.0.4 Enabled Settings
Required by: local_office365
Microsoft OneNote
repository_onenote
Additional 2015012701 28.0.0.1 Enabled Settings
Required by: local_microsoftservices, local_office365
Local plugins
Microsoft Services
local_microsoftservices
Additional 2015012703 28.0.0.3 Uninstall
Microsoft Account
local_msaccount
Additional 2015012701 28.0.0.1
Required by: local_microsoftservices
Microsoft Office 365 Integration
local_o365
Additional 2015012716 28.0.0.9
Required by: profilefield_o365, repository_office365, local_office365
Office 365 Integration
local_office365
Additional 2015012706 28.0.0.6 Uninstall
Microsoft OneNote
local_onenote
Additional 2015012702 28.0.0.2
Required by: assignsubmission_onenote, assignfeedback_onenote, block_onenote, repository_onenote, local_microsoftservices, local_office365

 
Average of ratings: -
Picture of Chester Folming
Ang: Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

Hi James

I did the whole install again on another server, and noticed this (installation hanging at this point) nu Success with the OneNote repository.

Can anybody explain this? (since it seems the installation can write in the repository folder).


 
Average of ratings: -
Picture of James McQuillan
Re: Ang: Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Thanks for this Chester - The repository capability that's referenced in the error message would have been installed during the installation, so the install hanging at that point would be cause. I've received one other report of this and am looking in to why the install would hang with the onenote repository. Appreciate the report - look for a fix in the next version or two.

 
Average of ratings: -
Picture of Paul Perger
Re: Ang: Re: תשובה ל: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

I have the same problem!

repository version: 2015012701 28.0.0.1

moodle version: 2.8.7+

When I start start automatic installation of the plugin, I get the hang as mentioned above. When I install in manually, it seems to work at first, but then the settings page for the repository is blank.

Paul

 
Average of ratings: -
Picture of Matthew Cutlack
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi all,

I have been working on installing this plugin over the weekend and wondered if you could help with a few questions.

Firstly, we have a new azure AD setup and when creating the Moodle app and setting permissions, I am finding that the "application" permissions for the Moodle app are refusing to be set for Azure directory read access. When I save the changes they return to being unset. Is this expected behavior? Or should I contact azure support? Delegated permissions for Azure access have set correctly.

Secondly, what is the HTTPs requirement for using these apps with Moodle? When I first installed the openid plugin I had a Moodle site that did not use HTTPs security. I have now installed a certificate due to the warnings I was receiving when moving between the launcher link in Office 365 and Moodle. I have set HTTPs to only kick in when using the Moodle logon page.

My "Redirect URI" in the plugin settings is still showing a http link. Should I expect that to change? Basically what is the ideal when it comes to https settings and Office 365 integration.

Kind Regards,

Matt 

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Matthew - 

Sometimes the Azure permissions can take a couple minutes to apply - are you getting an error trying to set the application permissions or it just not sticking? 

HTTPS is required by the oAuth2 standard to prevent access codes and tokens from being intercepted during authorization. The "Redirect URI" setting is generated from your site's wwwroot setting in $CFG, which is usually set in the config.php file for your Moodle site. Using HTTPS with the login page only won't change this setting, since OpenID Connect is not actually communicating with the normal login page, it's communicating with [site url]/auth/oidc. Best to enable HTTPS for your entire site if possible. Operating without HTTPS available for the whole site is possible, but quite insecure and not recommended.

Thanks,

- James

 
Average of ratings: -
Picture of Matthew Cutlack
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Thank you for the reply. The site is set to use HTTPs only now.

Regarding azure, the "application" permission for "read directory data" just wont stick. I set it and then save the setting. The total permissions then jump from 1 to 0. No error is thrown. The two "delegated" permission can be added and removed without issue.

Kind Regards,

Matt

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

That's weird, I've seen the permissions take a minute or two to apply but never not apply at all, I'll play around with it and see if I can reproduce that over here.

You may be fine with those permissions though, delegated permissions are the main set used in the plugins. You might see an issue with the username/password authentication flow in the OpenID Connect plugin but everything else should be fine. Have you tried out any of the functionality with the permissions you have now?

 
Average of ratings: -
Picture of Matthew Cutlack
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

The "application" permission setting seem to have finally stuck now. Tried this morning (via Chrome rather than IE doubt that made a difference) and they have stayed set.

My functionality as it stands now:

  • Credential pass through from the Office 365 launcher app is fine and the account gets logged in and connected to OpenID
  • Logging in via the Moodle logon page gives me a invalid login message (Login Flow of "Username/Password Authentication")

When a Moodle account is converted to using OpenID (From previously using LDAP) , is it expected that you continue to enter your username minus the UPN or domain?

Kind Regards,

Matt

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Good to hear that the application permission is working!

For the username/password flow, the username is the complete name of the office365 user, this is something like "james@rldev.onmicrosoft.com"

 
Average of ratings: -
Picture of Matthew Cutlack
Re: OneNote, Office365 and MS Mix Plugins now available
 

I still have issues with invalid user on the Moodle logon page, even with our tenant added to the username, so I guess I still have a issue to locate somewhere along the chain.

Regarding logging in via Moodle. So correct me if I am wrong, once a user is migrated to OpenID, they will have to start using a username with the addition of a UPN in the logon box?

If this is the case I am not sure we will be able to deploy this yet to users. We are a primary and secondary school and the younger students tend to struggle when the username is long. Hence for example with our ADFS logon page, we have set it up so that it automatically adds the domain to a users username when they logon.

Will the OpenID plugin support this sort of setup in the future automagically? Or maybe give the ability for the moodle admin to add a upn to a config field in the plugin to be used in conjunction with a users username when they logon?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Are you able to use the authorization request login flow successfully? Just trying to debug where the issue might be.

Yes once a user has migrated to OpenID, they will use their Office365 credentials to log in to Moodle, so if they use "james@rldev.onmicrosoft.com" to log in to Office365, they will use that + their Office365 password, even if their Moodle username was "testuser123" before the migration. Once migrated, it's 100% Office365 credentials.

I like the idea of automatically adding the tenant, this can get tricky however. You could have one Moodle user with the username "testuser1", and a different Office365 user with the username "testuser1@rldev.onmicrosoft.com". Normally Moodle enforces unique usernames, so conflicts aren't an issue. However with two different systems conflict resolution becomes a problem. I'm going to investigate how to resolve this but that's just some background on why things are the way they are.

For your users, have you looked at the authorization request login flow? This may a simpler way for them to log in to Moodle. Basically, it adds a button to the Moodle login page that when clicked, brings users to the Office365 login page, where they log in and are returned to Moodle. If they're already logged in to Office365, there's no login necessary, they're redirected immediately to Moodle and logged in. If your users are often logged in to Office365, this is a much simpler way to log in to Moodle.

 
Average of ratings: -
Picture of Matthew Cutlack
Re: OneNote, Office365 and MS Mix Plugins now available
 

Having just tested, Authorisation request login flow works as expected.


Why I have not gone for the authorisation flow initially is that:

  • users will most likely ignore the Office 365 icon and carry on using their known route to login to Moodle. Use will be patchy at best.
  • users need to use their full UPN with this method - will lead to confusion most likely complaints to the helpdesk
  • I like the idea of a system that in the end migrates the users across to OpenID without them needing to make a choice or make a change in behaviour to do so. So I would hope that either just by logging into Moodle or via the launcher in Office 365 they get their account converted to OpenID and can carry on as before.


I would consider Authorisation request if it could be set to fully replaced the Moodle login dialogue. For us we would also need it to redirect to our local federation server, rather than the standard Microsoft logon page. This would get around the issue of complex users login credentials.


 
Average of ratings: -
Picture of Matthew Cutlack
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thinking further on this, would it be possible to add a field for the "home realm" to alter the link generated in the authorisation request mode? 

It may be possible (but I am no developer) :

http://blogs.technet.com/b/ad/archive/2015/02/11/how-to-use-azure-ad-to-land-users-on-their-custom-login-page-from-within-your-app.aspx


The challenge then would be to alter the login urls on the moodle site to point to the https://domain/auth/oidc url rather than the default login page.

Looking at the admin option in Moodle there is a setting field but it looks like you could lock yourself out of Moodle when you change this. Ideally the url links on the Moodle site theme would adapt, but if you need to use a local manual account you could enter the direct url for the Moodle login page to bypass Azure AD

 
Average of ratings: -
Picture of Franscois Prinsloo
Re: OneNote, Office365 and MS Mix Plugins now available
 

Good Day Mike

Our school just got our Office 365 subscription and i have been trying to get moodle linked to it.

I have everything done, but the share point site does not want to setup, and one drive does not seem to work.

I did get an error where the plugin asked me for permissions to edit and modify notes, but i figured out how to fix that.

Any suggestions ?


Franscois

 
Average of ratings: -
Picture of John Semberger
Re: OneNote, Office365 and MS Mix Plugins now available
 

OK updated to the latest version and now running in to a snag. To recap, Office 365 single sign on is working, user synchronization is working, One Note (new feature) is working (very cool by the way thx.), OneDrive for Business is working.


What is NOT working is;

1) Calendars still wont sync.


2) New groups feature is not working. CRON is showing this error and I have one of these entries for each course;

Could not create group for course #2
array(1) {
  ["odata.error"]=>
  array(3) {
    ["code"]=>
    string(18) "Request_BadRequest"
    ["message"]=>
    array(2) {
      ["lang"]=>
      string(2) "en"
      ["value"]=>
      string(72) "Invalid value specified for property 'mailNickname' of resource 'Group'."
    }
    ["values"]=>
    NULL
  }
}


 
Average of ratings: -
Picture of Stuart Morrison
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi

I am very excited to see this suite of packages as I have been having a battle with getting Moodle to play nicely with Office 365 for a while.  I started with o365azureacs and arrived at a solution of sorts although it was buggy to say the least.  

I have now started a fresh install to prepare for the next years intake in September.  I tried Moodle 2.8 and the repository_onenote kept hanging on the database upgrade; I tried Moodle 2.9 and the plugins off moodle.org and it was the same.  I tried 2.9 and the master files from github and the install/upgrade completed.

I am now experiencing an error where if I try to log on using OpenID Connect (or set the System API user) I receive an error that the OIDC id_token is not received.  I am pretty sure that I have set up the App on Azure AD as directed on https://docs.moodle.org/27/en/Office365#User_groups 

I also have an Application Permissions error ("An error occurred trying to check permissions" - although I guess it would if a System API user is not set).

The "Application Credentials", " AzureAD Tenant", and the "OneDrive for Business URL" are registered as usable.  The "SharePoint Link" has a message saying "Moodle is setting up this SharePoint site" - I set it up in SharePoint as a Team Site just to see what would happen (although again without that System API User I am not expecting much).

I am not keen on activating the Microsoft Account Local Plugin as I am only really interested in the single sign on and the integration with the OneDrive for Business and Office 365.

Of all things there is a hyphen in the domain name (and AzureAD Tenant name) of my organisation which I know I have had to work around before now - although it does not feel like that this time.  Any ideas for where I can direct my next efforts would be welcome.

Thank you for all your efforts so far and kind regards

Stuart

 
Average of ratings: -
Picture of Steve Davus
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Stuart 

Did you ever resolve this issue? I'm experiencing the EXACT same problem.

I've tried everything I can think of to resolve this but nothing works.

If you, or anyone could shed some light into this situation that would be a lifesaver.


Steve

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Steve - What is the issue you're experiencing? Is it the "id_token not received" issue mentioned by Stuart?

 
Average of ratings: -
Picture of Steve Davus
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Yes its the exact same issue as Stuart is/was having word for word. If you could help with this issue it would be greatly appreciated.

Steve


 
Average of ratings: -
On the jetty
Re: OneNote, Office365 and MS Mix Plugins now available
 

Setting https afterwards

Hi, thanks for this set of plugs-ins, it really is  game changer for Moodle IMHO.

I've got it all working on moodle 2.8 but set it up with http rather than https.

I've enabled SSL on the site but seem unable to to get the auth/oidc redirect url to point to https instead of http. The string on the OpenID authentication plug-in page is just a text string and cannot be changed.

Is this set on Azure? I did try but it stopped working and could not find the token.

Many thanks for any advice or assistance provided.

Roger


 
Average of ratings: -
Picture of Matthew Cutlack
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Roger,

I did the same. Needed to set the site to full https via the config.php file using the site url field. I re-built the app on azure ad after I did this (which is proberly overkill) just to make sure the settings were across the board.

Matt

 
Average of ratings: -
On the jetty
Re: OneNote, Office365 and MS Mix Plugins now available
 

Just Use AD login and Integration

I'm still having problems installing the various Office 365 integrations (including ONE Repository capability errors and JQuery not loading etc), I did get single sign on and Sync users from AD on a previous install so may I ask:

  • What is the minimum plugins needed to just get AD sign on and User sync against an Office 365 account?

Thanks in advance for any assistance.


Roger

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Roger,

AzureAD sign on is provided by the OpenID Connect authentication plugin (auth_oidc), and user sync is provided by the office365 integration local plugin (local_o365). Installing those two should get you what you need.

A jQuery message shouldn't prevent any functionality, especially sign-on and user sync. Is the issue you raised with https resolved? If not that's the place to start. As Matthew mentioned, the redirect URL shown on the settings page is built using your site's wwwroot configuration variable, often set in config.php. This is a text string on the settings page (and can't be changed) because it's not really a setting - the plugin determines what the redirect URL needs to be based on your site's settings, and displays it there for you to use when configuring Azure.

 
Average of ratings: -
Picture of jay sweeney
Re: OneNote, Office365 and MS Mix Plugins now available
 

I've installed the Office 365 plugins a couple of times now but, each time I do the text disappears from the User Profile page.

This means that user's and myself as administrator don't have the facility to edit their User Profile or choose to connect to 365.

How can I get the User Profile fields to show?


 
Average of ratings: -
Picture of jay sweeney
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,


I'm still struggling with this and getting really desperate.  If anyone can help, I'd be really grateful.

The versions for the plugin are:

 

Office 365 Integration                    2015012706

Moodle                                                2014111000

Auth_oidc                                           2015012711

Local_o365                                          2015012716

Local_onenote                                  2015012702

Assignfeedback_onenote            2015012703

Assignsubmission_onenote        2015012702

Repository_onenote                      2015012701

Repository_office365                     2015012704

Profilefield_o365                             2015012702

Profilefield_oidc                               2015012702

Filter_oembed                                  2015012701

 

 

When I turned Debugging to ON, the following errors showed up on the “Edit Profile” page:

 

Warning: require_once(/var/www/html/moodle/local/msaccount/msaccount_client.php): failed to open stream: No such
file or directory in /var/www/html/moodle/local/onenote/classes/api/msaccount.php on line 30

 

Fatal error: require_once(): Failed opening required
‘/var/www/html/moodle/local/msaccount/msaccount_client.php’ (include_path=’/var/www/html/moodle/lib/zend:/var/www/html/moodle/lib/pear:.:/usr/share/php:/usr/share/pear’)
in /var/www/html/moodle/local/onenote/classes/api/msaccount.php on line 30

 


 
Average of ratings: -
Picture of jay sweeney
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,


Well I've worked out the problem - I need to install local_msaccount.

Unfortunately, I can't use the 'Install Plugin' page because I get the error above. I tried to uninstall the o365 plugin but, can't delete the repositories so, I'm stuck there.

I'm trying to use SSH to install the plugin but, I don't have the technical knowledge and my boss is off all week.  

I've found 'git clone' but, I'm not sure where to install the files.  Does anyone have any instructions please?

Best wishes

Jay 

 
Average of ratings: -
Picture of Mauricio Torres Masache
Re: OneNote, Office365 and MS Mix Plugins now available
 

If you have a user profile like this:

profile.jpg

The problem is a row missing in a table, I had the same problem when I install the pluggings.

Please execute the statement on your data base.

INSERT INTO `moodle`.`mdl_user_info_category`

(`id`,

`name`,

`sortorder`)

VALUES

(1,

'Other fields',

1);


Mauricio.


 
Average of ratings: -
Picture of Mike Halverson
Exisiting LDAP with Office 365 Integration & Moodle
 

Good Morning

Currently we are authenticating and syncing users via the LDAP authentication method plugin within Moodle (v 2.9.1).  Our student only have to user a username and password with no domain name attached (Example:  User:jdoe Password: 1234.  We would like to use the Office 365 integration, but cannot afford to give up the way users are logging into the system. 

Being that the student is logging to Moodle via the LDAP sync is there anyway that this method or a simple option would work in our environment?

Thanks in advance for any assistance you can provide.


 
Average of ratings: -
Picture of David Toon
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike

Thanks for all the information on this great suite of Tools.

We have installed them all into our Moodle 2.7 site and have successfully switched our authentication to sign in users using Office 365. We have also installed the plugins for both Sharepoint and OneDrive Repositories.

The only plugin we have issues with is the OneDrive Submission for Assignments.

 - We can create an assignment with OneDrive set for the Submission Type
 - We hit the "Work on this" button, which opens up OneNote, creates the relevant page and section for the assignment.
 - We then return to Moodle to hit Save and get a "Can not read file, either the file does not exist or there are permission problems."

Switching to debug mode reveals that the local_onenote plugin is trying to create a temp directory and download a copy of the OneNote page into this directory in the form of a zip file. 

I have a attached a screenshot of the error message to see if anyone can advise on where and what permissions are required?

Any advice would be greatly appreciated.

To confirm, we are using the latest versions of all the relevant plugins.

Many Thanks 

David


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi David - It looks like it's trying to create a temporary file in C:\Users\STUDEN~1\AppData\Local\Temp - are there permissions set up on that folder that are preventing access?

 
Average of ratings: -
Picture of David Toon
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James

Thanks for getting back.

We are using IIS so have given the in-built user ie  IUSR full write access to our moodle web servers C:\USERS folder, thinking this may fix it but to no avail.

Is the plugin trying to create the temp directory on the moodle server IIS or local client machine?

We are also not sure where this path orginates from, as STUDEN~1 is not part of our exisiting structure on our network, so we can only assume the plugin is building this path and then trying to create it.

There doesn't seem to be any information on permissions to allow the plugin to create the folder and download the Onenote Page, so bit confused.

It look as though the screenshot of the error message has been removed from the forum so here it is in text for anyone who cant see the screenshot:

Error Code : storedfilecannotread

Stack Trace:

 - line 1626 of \lib\filestorage\file_storage.php:file_exception thrown

Output Buffer :

Failed to create temp folder C:\Users\STUDEN1\.AppData\LocalVremp\asg_55b0f6a79338cWarning: mkdirO: File exists in C:\inetpub\moodle27\moodle\localonenote\classes\api\base.php


Failed to create temp folder: C:\Users\STUDEN—1\.AppData\Local\Temp\asg_55b0f6ac36b2f Warning: flle_put_contents(\page.html): failed to open stream: Permission denied in C:\inetpubmoodle27\moodle\local\onenote\classes\api\base.php on line 228

Warning: filesize: stat failed for

\asg_55b0f6a79374f.zip in C:\inetpub\moodle27\moodle\mod\assignsubmission\onenote\locallib.php  on line 221







 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi David, 

That directory is referring to a path on the server, Moodle is downloading the user's OneNote file into a temporary directory for processing. That directory is the directory PHP stores temporary files in by default. What version of PHP are you running? This value can be set in the PHP INI file in PHP 5.5 and later. 

Setting write permissions *should* fix the issue, you mentioned you grated the webserver access to C:\USERS - was this recursive? It looks like the permission would need to apply to C:\Users\STUDEN1\.AppData\LocalVremp\

I'm also going to look at the use of this directory for a future release, Moodle data might be a better choice here.

 
Average of ratings: -
Picture of Gabriel Kulevicius
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi team, I think We've found a bug in course / group creation functionality in this integration.

We've found that some groups are created and some are not in O365. We get this error with some courses in crontab debug:

Execute scheduled task: Create user groups in Office365
... started 12:58:24. Current memory use 62.3MB.
Could not create group for course #8 array(1) { ["odata.error"]=> array(2) { ["code"]=> string(27) "Service_InternalServerError" ["message"]=> array(2) { ["lang"]=> string(2) "en" ["value"]=> string(37) "Encountered an internal server error." } } }

When analyzing and having some test, we have seen that in O365 is created with Moodle fullname, and is failing maybe because unicode characters, for example this two course fullnames fails:

"La consulta médica en contexto". Herramientas para la gestión clínica y sanitaria (2013)

Historia Clínica Electrónica (2013)

and this one is created with success:

Diploma en Cuidado Paliativo (2013)

Can you check it?

best,


 
Average of ratings: -
Picture of Gabriel Kulevicius
Re: OneNote, Office365 and MS Mix Plugins now available
 

Also, if shortname has spaces, like this example:

e-ABC Office Mevea

we get this error:

Could not create group for course #47
array(1) {
  ["odata.error"]=>
  array(3) {
    ["code"]=>
    string(18) "Request_BadRequest"
    ["message"]=>
    array(2) {
      ["lang"]=>
      string(2) "en"
      ["value"]=>
      string(72) "Invalid value specified for property 'mailNickname' of resource 'Group'."
    }
    ["values"]=>
    array(2) {
      [0]=>
      array(2) {
        ["item"]=>
        string(12) "PropertyName"
        ["value"]=>
        string(12) "mailNickname"
      }
      [1]=>
      array(2) {
        ["item"]=>
        string(17) "PropertyErrorCode"
        ["value"]=>
        string(12) "InvalidValue"
      }
    }
  }
}
I think this is because when creating group in O365, short name is used in order to compose the group's email

best


 
Average of ratings: -
Picture of Kimmo Kiiskinen
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi


what are the minimum rights (in Azure AD) for the system API user? It says in the local-plugin helptext that "Any Azure AD user, but it should be either the account of an administrator, or a dedicated account",  so does it have to be a Global admin -account?


 
Average of ratings: -
Picture of Sam McCullough
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello,

Has anyone had any experience with the OpenID Connect plugin disabling itself? I recently installed and setup the plugin to connect to AzureAD. In the last 36 hours the plugin has been disabled twice. There are no logs to show human intervention, which is still at the top of my list, but I need to work through this locally. 


Can AzureAD send any commands to disable OpenID Connect? In a similar manner that AzureAD can populate the Auth Endpoint and Token Enpoint.


Best Regards,

Sam

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Sam,

Strange issue, Moodle unfortunately doesn't create a log entry when a human disables a plugin so that is still a possibility. Azure cannot send any commands into Moodle without Moodle requesting something first, and there's no code within OpenID Connect (or the other Office plugins) to disable the OpenID Connect auth plugin. I'll see if I can identify any way this could happen other than human intervention, but that's my suspicion also.

Thanks,

- James

 
Average of ratings: -
Picture of Sam McCullough
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Thanks for getting back to me this is what I thought. Do you think it is possible to alter the plugin to output any enable/disable actions to either the log or config change report? 

Sam

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

It's not really something that a plugin can/should do, but the idea did come up in the Moodle tracker issue so it may be something you see Moodle add in the future. 

 
Average of ratings: -
Picture of Frankie Clark
Re: OneNote, Office365 and MS Mix Plugins now available
 

Sure you all are tired of this one, but trying to get clarification on the use of the O365 for Education account, One Drive for Business, and the Moodle/O365 plugins situation. 


Is it possible (does appear to be on GitHub and Tracker) to integrate One Drive for Business in the O365 for Education scenario? I believe you can't add the O365 for Ed One Drive (personal) but it is possible to integrate the One Drive for Business?


We tried on the O365 Apps permissions side and essentially crashed course pages with the OneNote plugin...after debugging the base.php file at the appropriate line of code:

// echo var_dump($response->error); 
// returns: object(stdClass)#1818 (3) { ["code"]=> string(5) "30105" ["message"]=> string(55) "OneDrive for Business is not provisioned for this user." ["@api.url"]=> string(45) "http://go.microsoft.com/fwlink/?LinkId=533061" }

This github entry claims it's possible, but still unsure of the O365 for Education issues with One Drive for Business integration:

https://github.com/hirnidrin/moodle-repository_onedriveforbusiness


Can we link the generic Microsoft Services account included in the O365 plugins package to One Drive for Business? 


Any thoughts or suggestions?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Just a note for anyone else reading this - discussing this issue in https://tracker.moodle.org/browse/CONTRIB-5915

 
Average of ratings: -
Picture of Hok-hoi Yeung
回應: OneNote, Office365 and MS Mix Plugins now available
 

Mike,

I have installed the following related plugin of office 365.

auth_oidc

local_o365

repository_office365

profilefield_o365

profilefield_oidc

filter_oembed

After the installation, I cannot login moodle via office 365. 

And then, I tried to uninstall all of them, but some plugin cannot be uninstalled such as Office365 Connection and Microsoft Office 365 Integration. 


The error messages are shown as follows when I tried to edit a question: 

Warning: require_once(/var/www/moodle/local/msaccount/msaccount_client.php): failed to open stream: No such file or directory in /var/www/moodle/local/onenote/classes/api/msaccount.phpon line 30

Fatal error: require_once(): Failed opening required '/var/www/moodle/local/msaccount/msaccount_client.php' (include_path='/var/www/moodle/lib/zend:/var/www/moodle/lib/pear:.:/usr/share/php:/usr/share/pear') in /var/www/moodle/local/onenote/classes/api/msaccount.php on line 30


When I browsed on the plugins overview, some message are shown as follows:

Can not add jQuery plugins after starting page output!


line 487 of /lib/outputrequirementslib.php: call to debugging()

line 431 of /lib/outputrequirementslib.php: call to page_requirements_manager->jquery_plugin()

line 26 of /local/o365/settings.php: call to page_requirements_manager->jquery()

line 67 of /lib/classes/plugininfo/local.php: call to include()

line 500 of /admin/settings/plugins.php: call to core\plugininfo\local->load_settings()

line 6874 of /lib/adminlib.php: call to require()

line 468 of /lib/classes/plugininfo/base.php: call to admin_get_root()

line 1294 of /admin/renderer.php: call to core\plugininfo\base->get_settings_url()

line 372 of /admin/renderer.php: call to core_admin_renderer->plugins_control_panel()

line 207 of /admin/plugins.php: call to core_admin_renderer->plugin_management_page()


I think the main problem is due to the integration with office 365. Please give me any suggestions to fix it.


 
Average of ratings: -
Picture of James McQuillan
Re: 回應: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Hok-hoi Yeung,

The newest version should resolve this - can you upgrade and let me know if you are still experiencing issues?

Thanks!

- James

 
Average of ratings: -
Picture of Angus Denton
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi Mike

Thanks for the plugins but I have a problem I do not understand..

Firstly I have run up a test Moodle on a Bitnami stack so it's Moodle 2.9.2, I have managed to install the plugins and now I am in configuration land.

I have an MS O365 account as a global admin and I am also listed in AzureAD as a co-administrator.

Our internal Active Directory is linked by the Directory Sync tool

I have created the Application in AzureAD and got clientID's and secrets

When I go to input my credentials into the SystemAPI User box I just get a loop of redirections from windowslogin to the Moodle /auith/oicd/ and back again.

In fact if I drop the address of moodletest.schoold.edu.au/moodle/auth/oicd/ into a browser it simply loops between redirectrs to each server in definately .. I do not understand what is happening can you help ?


Angus Denton

Australian Film TV and Radio School

 
Average of ratings: -
Picture of Angus Denton
Re: OneNote, Office365 and MS Mix Plugins now available
 

Additional Question is setting up the Microsoft services that support One Note.

  1. Why do I need to create a new Microsoft Account ?
  2. Should this account be set up as a gloabl admin in Azure AD ?
  3. Should this account also exist in Moodle or have privledges in Moodle?
  4. Why can't this service use an exisitng 0365 account  or the global admins account in AzureAD?
  5. Since I am creating an Application in here ( having already created the Moodle application in AzureAD) how does this part of the plugin suite relate One Note to the Office 365 user database  in AzureAD synced through our schools directory Sync ?

I don't understand what I am setting up and why and the implication for how I set it up here, can you please shed some light ?!!!


Angus

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hope these help:

1. You don't need to create a Microsoft account to use OneNote, if you add OneNote to the application in Azure, you can use it with all your Office 365 accounts.

2. The account you set as the "System API User" should be an administrator account, but that's the only place you'd need an admin.

3. The "System API User" does not need an account in Moodle.

4. The "System API User" can be an existing Azure/Office 365 account.

5. Adding OneNote to the application in Azure gives all users in that Azure AD access to OneNote. I think the confusion here came because the OneNote plugins can also be used without Azure/Office 365, with only a Microsoft account. However if you've added OneNote to the Azure application, and Office 365 users in Moodle will use their Office 365 account to access OneNote - they won't even see anything Microsoft account-related.

 
Average of ratings: -
Picture of Angus Denton
Re: OneNote, Office365 and MS Mix Plugins now available
 

Alright I have identified most of the issues 

My primary issue was in the application configuration.

I had put the wrong value into the sign on URL box I had entered the {mymoodlesiteurl}/auth/oicd address instead of {mymoodlesiteurl}/logon/index.php

This has auto filled the reply URL which I still suspect is wrong as I cannot set the API user credentials.

What is the appropriate endpoint in the Moodle instance that receives SAML tokens ?

So

I have manually created an account in Moodle that has the same username as the Azure Account

set the auth method for this account to use OpenID provider

successfully logged in from the System API user "Set User" link in the Microsoft Office365 Integration setting from Moodle

but the plugin still reports that no API user token is available


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

In the Azure application the correct value for "Sign On URL" is {moodlesite}/auth/oidc, so you had that right the first time.

You also don't need to create an account in Moodle manually - in fact it's better if you don't. When logging in using OpenID Connect, Moodle will create a user if a user doesn't exist for the Office 365 user, and set up the correct data to understand the connection. It's based off more than just the username so creating a Moodle account manually with the same username will not immediately link it to Office 365.

Try setting the sign-on URL back to /auth/oidc and set the System API user again - let me know how that goes.

 
Average of ratings: -
Picture of Angus Denton
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James

Just so that you are ware we are running tests and scenarios here so I am not working on a 'Live production Moodle' The users are test users who exist in this test Moodle and who also have accounts in Azure AD with o365 educatinional licences.

From my previoius post and reply 

I have set the logon address back to the /auth/oicd/ value and I can authenticate into Moodle using AzureAD credentials through Moodle.. All Good
 but I still do not know how I ended up in a redirection Loop before..

There is now another couple of issues

1 I get en error message for the Unified API and the Office365 API (See screen shot) 

If I run the health check it tells me that the connection is OK

Health OK

In the current state, I am not getting any consistent calendar syncronisation with Moodle at this point

I have had some calendar synchronization but it appears to have stopped functioning and I cannot see why  !



 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Angus,

Can you try each of the following and let me know how they go?

- If you have the Unified API added to your Azure application, remove it and try the Azure setup again. The unified API is in preview and changing so I'm recommending against using it at the moment (I know the plugins say to add it right now, that will be updated next release)

- Enable the "record debug messages" setting, save the settings, and then run the Azure setup tool. Then go to Site Administration > Reports > Logs, change the "All activities" dropdown to "site errors" and click "Get these logs". If you see anything recent from "Microsoft Office 365 Integration API Failure" can you send it to me in a private message? That should show exactly what's going on.

Thanks!

 
Average of ratings: -
Picture of John House
Re: OneNote, Office365 and MS Mix Plugins now available
 

Would like to hear the outcome from this.  I am have a similar issue with this as well.  When I run the logs I get a insufficient privileges to complete the operation error.

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi John - are you using the latest version of the plugins? I've updated the setup tool recently which may solve your problem. 

 
Average of ratings: -
Picture of Angus Denton
Re: OneNote, Office365 and MS Mix Plugins now available
 

I think I have discovered an issue that is not documented in the setup docs and is related to the redirection loop described above...

When you set the user for the System API user in the O365 plugin (Site Administration>plugins>local plugins>Microsoft office365 integration) you must ensure that in the sync with Azure AD section the "Create accounts in Moodle for users in Azure AD" check box is set. Otherwise there is a redirection loop that occurs between Moodle and MS

For my part having set that checkbox the redirection loop stopped, however there wasn't an Moodle account created for the Azure user specified for system API access ?

As users in our organisation will have a different username in AzureAD to institutional Active Directory  (studentnumber@inst.edu.au vs student number) I don't want Azure AD creating user accounts in Moodle for students, I want this sync setting left unchecked (It appears that the students O365 Accounts must be name spaced @synced domain) therefore

I do not want students having their account authentication method delegated to AzureAD, we will expect them to setup O365 from their Moodle profiles. (hopefully we don't have to have the account creation Sync switched on so that the users token can be recorded in this process)

Finally, as a question to @James McQuillian is it possible to default the student calendar settings to Sync calendars with every course the student is enrolled in rather than have the student manually setup each course unit for sync to 365 outlook ?


Regards


Angus

 
Average of ratings: -
Picture of Daemon Hunt
Re: OneNote, Office365 and MS Mix Plugins now available
 

*BUMP* In terms of automatically syncing Moodle calendars with Office365 I second this. Having our students manually sync their calendars is just not feasible in our institution, and many won't, even if we recommend that they do and provide clear instruction how to do this.

If we could set the syncing behaviour from some sort of plugin e.g. Sync all courses calendars with Office 365, or, Sync site calendar with Office 365, or other options, this would give us fine-grained control. In our case we only want course calendars synchronised automatically, not the site calendar.

I'm guessing this would require another plugin? Our student enrolments are processed by third-party enrolment plugin, and my guess is that this calendar sync feature would have to tie not to auth but enrolment.

My other issue in testing is that calendar schedules are showing the AD administrator's account as the 'organiser' and this would be confusing for our students.

If you look at the image below you will see the organiser's name "ADSync". Couldn't this be the name of the actual Moodle site? e.g. Moodle, Contoso University? Or perhaps a custom field could dictate what shows here?

ADSync

 
Average of ratings: -
Picture of ahmad almarzouk
Re: OneNote, Office365 and MS Mix Plugins now available
 

am having some problems with permission preventing office calendar sync and file upload from moodle to one drive dont know what am missing


azure error am facing

azure ad permissions

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi All,

We have been using these plugins since the start of term now and they are working great, well done to all involved in getting these together. 

I was wondering is it possible to sync user pictures from Azure Active Directory into Moodle. I have had a search around the net and cannot find anything.

Apologies if I am just missing something simple.

Thanks in advance,

Darren

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi all,

I was wondering would anyone have any ideas on this?

Thanks,

Darren

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Darren, 

This feature is on our list to implement - I don't have a specific schedule for it but definitely something we want to do.

Thanks!

- James

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,


I hope you are keeping well. 

Thank you for the reply and all the work you guys have put into the plugins thus far. Really looking forward to any more functionally that may be in the pipeline. 

Best,

Darren 



 
Average of ratings: -
Picture of David Challoner
Re: OneNote, Office365 and MS Mix Plugins now available
 

There is a lot of replies here so please forgive me if this has been answered.  My school switched Office 365 on in September and I started using ClassNoteBook then.  I've now put the Moodle Plugins in and have created new ClassNoteBooks, but I would like to link to an existing ClassNoteBook for the group I started using it with in September.  Is this possible and if so how?


Dave

 
Average of ratings: -
Picture of Raymond Schott
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,

I have a concern about the Office365 plugin, we currently have this plugin configured for about half of our students that use Moodle with in our organization. We have our students use this so they can use One Drive for Business to submit their homework/projects. The issue that we have been running into since we do not use the Open ID option, is that after a student had changed their "AD" password we believe the Office 365 token expires therefore terminates the connection between Office 365 and Moodle. I know changing over students account to Open ID can be used as a fix, but the other half of our Organization uses Google Drive and are not planning to switch to O365. We are just looking for a way to have our students disconnect from O365 then reconnect to refresh the Token. We use to have this option in an older version of the O365 Plugin, but our Moodle Administrator updated it. So my question boils down to what other ways can we handle this? Is Open ID our only option? Can we revert to an older plug-in? Do you plan on adding the option to disconnect/reconnect (or are we just not seeing the option)? Any help would be greatly Appreciated. See attachment below.

Thanks,

Ray S


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Raymond,

Sorry about that - looks like the link got left out of the redesign. The functionality to disconnect is still there, so if a user navigates to [moodle]/local/o365/ucp.php?action=disconnecttoken they will be disconnected as they were previously. They can then reconnect like normal (they'll need the manage openid connection capability, but sounds like you've already added that). This link will be added back to the new design shortly.

As an aside, I've added a task to handle this case better - refreshing tokens for connected accounts. Hoping to have a good solution that won't require disconnecting and reconnecting.

Thanks for the report!

 
Average of ratings: -
Picture of Val Hartman
Re: OneNote, Office365 and MS Mix Plugins now available
 
James,


Thank you for your response.  I worked with Ray.  He is no longer with YTI Career Institute.  My question is that all our students require a password change every 90 days.  So with this link that was left out in the re-design, do we just have our students use the link (you provided above) when they need to disconnect from Moodle and OneDrive after a password change?  or is there a way to have students configure their account to use Office365 as their main Login.  My issue with that right now is all our students are set to use the Manual Account authentication option.  If they configure it to use Office365, will it automatically change their Authentication to OpenID Connect.

Thank you for your help!

Val Hartman

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Val,

Correct the next update will include a disconnect link, after which users can re-connect which will refresh their token after a password change. Eventually this will be more streamlined so it won't be a disconnect-reconnect, but a simple one-step refresh process. As for you question re: authentication. There are two ways to connect to Office 365, the first as you mentioned involves authenticating with OpenID Connect. However, you can also connect to Office 365 using a "connected account" setup. 

In a connected account setup, the user authenticates with Office 365 once, and the token that is generated is saved and used for all future requests. The user's Moodle existing authentication method stays the same - so this is the method you'll want to use if you want your users to keep the manual authentication method. This is accomplished by first clicking "Connect to Office 365" from the Microsoft block. This brings you to the Office 365 user control panel. Click the "Click Here to Connect" link in the "Connection status" box on the right side of the screen. Users will be redirected to Office 365, they'll log in there, then be redirected back to Moodle. From there the connection status box should indicate they are now connected, and they will be able to use the Office features.

 
Average of ratings: -
Picture of Val Hartman
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thank you, James.  I've created directions for the students and Faculty to Login using Office365 and have tested a couple users and it has worked well.

However, I'm having a couple Instructors where I am following the exact instructions you stated above and they are receiving an error message "Error writing to Database" after they click "Start using Office 365 to log in to Moodle"

I've attached the error message.  Not sure where to go from here. 

Please let me know if you need more detail.

Thank you, Val



 
Average of ratings: -
Picture of Val Hartman
error/moodle/dmlwriteexception
 

I am having continual issues trying to connect users to Office365.  The past couple people who have had password changes or issues with accounts have not been able to connect.  I have the user - Click her to connect - then it takes to next Page with an error message "Error writing to database". I click More Information about this error and it displays the following:  I'm not sure how to resolve this issue.  It's happening with multiple students.

error/moodle/dmlwriteexception

This indicates that a general error occurred when Moodle tried to write to the database. If you turn on Debugging you will get more detailed information about what the problem is.

MySQL

If you're using a MySQL database for your Moodle installation, this error can be caused by the server's max_allowed_packet size being configured incorrectly. Increasing this value may resolve the issue.

dmlwriteexception error when restoring a course

If you obtain a dmlwriteexception error when restoring a course, it is recommended that InnoDB tables are converted to the Barracuda file format. See the section 'Converting InnoDB tables to Barracuda' in Administration via command line for details of why this is recommended plus information on a tool for converting tables.

See also


 
Average of ratings: -
Picture of James McQuillan
Re: error/moodle/dmlwriteexception
Group Core developersGroup Plugin developers

Hi Val, 

- Were you able to upgrade to the latest version of the plugins? We added the disconnect link back in for users who've had password changes.

- Can you describe the process users are using to connect? You mentioned they're clicking the "Start using Office 365 to log in to Moodle" link - is this from the Microsoft block? A profile field?

- Are you able to turn on debugging in your Moodle instance to get more information as to what the database error is?


 
Average of ratings: -
Picture of Val Hartman
Re: error/moodle/dmlwriteexception
 

Hi James,

We aren't able to upgrade right now because we are in the middle of moving our entire moodle environment to a new company.

I am having another serious issue right now.  Our OpenID Connect option has been disabling itself (Site Administration - Plugins - Authentication - Manage Authentication).  When this disables, the Login with Office365 option disappears from the login page.  I don't understand why this disables.  No one goes into this section.

Is it a licensing issue?

Thank you James!

When I have a moment, I'll respond to your other questions.



 
Average of ratings: -
Picture of James McQuillan
Re: error/moodle/dmlwriteexception
Group Core developersGroup Plugin developers

Hi Val,

That's weird... It's definitely not a licensing issue - there's no license required to use OpenID Connect (and it can in fact be used with other non-Office 365 OpenID Connect providers as well). There is nothing in any of our plugins that would disable it either. You're sure there's no other admins that might be disabling it accidentally? Is there any consistency to when it would be disabled? Time? Events?

So you have a number of other plugins installed? Could you send me a list? The record Moodle keeps of enabled auth plugins is fragile, I'm wondering if another plugin might be overwriting the value in an unsafe manner.


 
Average of ratings: -
Picture of Dario Züger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello

I configured your Plug-Ins to sync my aad users to moodle. this works great. The problem is that the cron job cannot assign aad users to existing moodle users. I get the following error: Could not assign user "o365 user" Reason: Error in API call: One or more properties are invalid.
Found a user in Azure AD that seems to match a user in Moodle

What can I do?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Dario,

From the local plugin settings page, enable "record debug messages". Reproduce the problem (i.e. run the cron again), then go to SIte Administration > Reports > Logs. Change "All activities" to "Site errors" and click "Get these logs". This should show you more information about why there was an error in cron operation. Any time you see an "error in api call" message you should be able to get more information from this log. If it's not clear what the issue is can you send me what it says?

Thanks!

- James

 
Average of ratings: -
Picture of Dario Züger
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James

Thanks for your help. I get the following error:

Component: Microsoft Office 365 Integration
Event Name: API failure
Description: local_o365\rest\azuread::assign_user:311: Error response received. Data: Array ( [code] => Request_BadRequest [message] => Array ( [lang] => en [value] => One or more properties are invalid. ) [values] => )

I don't have activated the new Microsoft Graph API in the local plugin.

Dario

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Dario - are you attempting to connect Office 365 users to Moodle users or assign Office 365 users to your Azure application? (The user sync  settings "Match preexisting Moodle users with same-named accounts in Azure AD" or "Assign users to application during sync", respectively)

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello,

I am very new to Moodle but I am trying to set up these Office 365 plugins for my organization. I have followed the documentation, but for some reason when a user logs into moodle using their office 365 account, none of the fields are mapped even though they are set to map on login & creation.

This happens for every user I have tried EXCEPT for my user account and the system API account I used to setup the plugins.

I'm sure I am missing something simple, so any help is appreciated!

EDIT: Here is a debug message from the time a user tried to login:

22 Jan, 14:31 - - System Microsoft Office 365 Integration API failure Unknown function: Error writing to database Data: (null) web

Thanks

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Kyle - the debug message you posted - is that a standard Moodle error message or do you have "Record debug messages" enabled in the local plugin settings?


If you don't have "Record debug messages" enabled, can you:

1) Go to the local plugin settings page (Site Administration > Plugins > Local plugins > Microsoft Office 365 Integration), check the "Record debug messages" setting, and click Save changes.

2) Go to the OpenID Connect authentication plugin settings page (Site administration > Plugins > Authentication > OpenID Connect), check the "Record debug messages" setting, and click Save changes.

3) Have a user log in (i.e. reproduce the error).

4) Log back in to Moodle as an administrator and go to Site Administration > Reports > Logs, change the "All Activities" select box to "Site errors" and click "Get these logs".

5) Look for any recent logs that include OpenID Connect or Office 365, and send them to me or post them here (only post them here if there is no personally identifiable information please).


Thanks!

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,


Yes record debug messages for both of those was already turned on. I had a user sign in again to reproduce the issue. There are the logs again (same ones):


Moodle Error


Thanks,

Kyle

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Kyle, can you also enable Moodle developer debugging? (Site administration > Development > Debugging). That should explain *why* there was an error writing to database (sometimes Moodle error messages are so vague!) Thanks!

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Developer Debugging was already on. I recreated the issue just now to make sure and I am getting the exact same logs. Not very useful on Moodle's part.

Its just really strange that there are no issues with my account and the System account I used to set it up but it doesn't work for anyone else.

Also, I thought I mentioned this earlier but I guess not, we have Moodle hosted as an azure web app instead of running on a traditional server. Are there any special considerations there?

Thanks,

Kyle

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

There shouldn't be anything special about running on Azure. Can you run the Health check and the Azure setup tool (both on the Office 365 local plugin settings page) and verify they report no issues?

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Health check runs fine:

moodl

Azure Setup runs fine:

moodle


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Strange. You mentioned it worked for your user account and the system API user - anything noticeably different about these users? Are they both admins? If so, are any other admins able to log in?

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Yes it works for my user account and the API user which are both Office 365 administrators. But I have had a few of the other admins try and it doesn't work for them.


Just to clarify, everyone is able to login, but for some reason Moodle isn't grabbing any of the profile fields from Office 365 (except for my user and the API user).


Thanks,

Kyle

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello,

Haven't got a response about this in a while. Anything else I can try?

Thanks,

Kyle

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Kyle, I've improved the debug logging in the latest version of the plugins - I'm hoping that gives us some additional information about that database error. Can you upgrade, try it again, and see if the new debug message provides any more useful information? Thanks!

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

I've got some better logs this time. Blocking out personal info below...


moodle 3


The error at 9:45 was probably because I updated the password for the API user, but the other two at 10:16 happened when I had a user try to login. 

Thanks,

Kyle

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Perfect - that shows exactly what's going on. I've created a bug report to get this fixed. Appreciate the info!

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thanks for your help! How will I know when this is fixed?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

I have included a link to this post in our issue - either myself or another developer will update you when this is released.

 
Average of ratings: -
Picture of Kyle Vinagro
Re: OneNote, Office365 and MS Mix Plugins now available
 

Just wondering if this bug has been fixed yet? Thanks

 
Average of ratings: -
Picture of Nick Truchman
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello,

Thanks for this fantastic work.

I'm trying to install your plugins on my university's test Moodle and I'm stucked with OpenID : when trying to set the System API User, I get this error :

auth_oidc\oidcclient::tokenrequest:251: Bad response received Data: 
(string)Could not resolve host: login.windows.net; Unknown error

I've trippled-checked everything but I can't get rid of it. sad

What settings should I check ? Can we "reset" your plugins to their initial state ?

Thanks for your answer,

Nick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Nick, 

What version of the plugins are you on? We updated the endpoints in a recent version, although I didn't think the old ones would disappear so quickly.

The new endpoints (set in OpenID Connect) are:

Authorization endpoint: https://login.microsoftonline.com/common/oauth2/authorize

Token endpoint: https://login.microsoftonline.com/common/oauth2/token

These are the new defaults but looks like the old ones might not work under some circumstances. Can you update the endpoints that are set in OpenID Connect to the ones above, click Save changes, and let me know if that fixes the issue?

Thanks!

 
Average of ratings: -
Picture of Nick Truchman
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Sorry for the delay.

Please find attached my plugins version.

I've changed the endpoints to the one you gave me but it doesn't change anything : I'm still getting a "error/auth oidc/erroroidccall".

Thanks for your help,

Nick


plugins

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Can you enable the "Record debug messages" setting in both OpenID Connect and the Office 365 local plugin and reproduce the error? This should record debug messages viewable in the log report (Site Admin > Reports > Logs, change "All activities" to "Site errors" and click "Get these logs). Can you let me know if there's anything useful in there?

 
Average of ratings: -
Picture of Nick Truchman
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Here is what I get when enabling bug reporting :

OpenID ConnectDebug messageauth_oidc\oidcclient::tokenrequest:251: Bad response received Data: (string)Could not resolve host: login.microsoftonline.com; Unknown error
For the record, the urls are :

Authorization Endpoint : https://login.microsoftonline.com/common/oauth2/authorize

and

Token Endpoint : https://login.microsoftonline.com/common/oauth2/token

and I've triple-checked all the links between Moodle and Azure...

Thanks for your help,

Sincerely,

Nicolas

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Nick, Those are the correct endpoints - can you access them from your own machine? Looks like the same error as when you were using the older endpoints - can your server access the internet? Is there a firewall that might be blocking outbound connections?

 
Average of ratings: -
Picture of Nick Truchman
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

You were right : it was a stupid firewall problem :'(

Now that authentication works, I've got a Azure problem, described in this post :

https://moodle.org/mod/forum/discuss.php?d=278647#p1338132

Sincerely,

Nick

 
Average of ratings: -
Picture of Rene Ouellette
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi All,

I am trying to get a test Moodle server connected to Office 365, and am running into an issue when I try to set the system api user.


Incorrect sesskey submitted, form not accepted!


Debug info: 
Error code: invalidsesskey
Stack trace:
  • line 488 of /lib/setuplib.php: moodle_exception thrown
  • line 45 of /admin/oauth2callback.php: call to print_error()
Moodle 3.02 on My SQL, Ubuntu 14.04


I think I have Moodle and Azure AD setup correctly, but a lot of the documentation seems different than the current view I am using.


Thanks,

Rene

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Rene - can you describe what you've done so far for setup and the process you're using to log in to Office 365?

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi all,

I am having a strange issue that I'm hoping someone maybe able to shed some light on. We are syncing users from Azure Active Directory, the scheduled job runs fine and when I preform a health check it says that there a no issues with the office 365 integration. However it doesn't seem like users are being synced in or if they are it is at a very slow rate sometimes I can see 5 new users added when I know there should be 100.

I was wondering would anyone have experienced an issue similar to this?

Any thoughts at all would be greatly appreciated.

Thanks and regards,

Darren  

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi All,

Just following up on my post above. I can see this error in the logs when the sync jobs runs:

importfromoutlook: Error syncing events Data: (string)Error in API call: The time zone information is missing on the DateTimeOffset value '2016-02-03T09:15:04'. A DateTimeOffset value must contain the time zone information.

Any help would be greatly appreciated.

Thanks,

Darren

 
Average of ratings: -
Picture of Darren O'Neill
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi All,

Please accept my apologies for the bombardment of the forum this morning. Just following on from my two posts above. I checked the output from the cron job and can see the below message:

Execute scheduled task: Sync users with Azure AD.

... started 10:10:07. Current memory use 19.1MB.

No more users to sync.

This is odd, as there are definitely users who exist in Azure AD who are not in Moodle.

I was wondering would anyone have any idea?

Apologies again for the multiple posts.

Best,

Darren 

 
Average of ratings: -
Picture of Stuart Disney
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi All,

I have installed the local_0365 plugins (from December) into out Moodle 2.8.5 environment and we have Office 365 for Business. Looks really good so far, OneNote and OneDrive For Business Repositories work OK as does Onenote Assignment and Feedback. Users log in using LDAP Syncplus and use the Microsoft Block to connect to O265 OK, we are not doing any syncing yet with OPENid. We do have a couple of issues which hopefully you can help with.

1. When the user connect to Office 365 the get a notebook created called  [ [notebookname] ] . It all seems to work ok in that they get a section created for each course they are enrolled on and assignment/feedback works ok but it would help if we could call it something meaningful. I have found https://tracker.moodle.org/browse/CONTRIB-5703 which I have updated, but any workaround for this?

2. Maybe related to 1, but the Microsoft block, states it can't find my Moodle notebook, I have the 'notebookname' and a 'moodle' notebook I created myself from within office, where/how is it looking for my moodle notebook?

3. We have one user (everybody else is ok!) who when they try to connect to office 365 from the Microsoft block it seems to try and authenticate with AzureAD but they do not connect and get sent to the User creation screen with openid authentication, implying that Azure Authentication didn't work so it tries and create a new user. The user can connect (outside moodle) to their O365 account with no problem using Windows Authentication/AzureAD. Any ideas what is being checked from moodle to AzureAD and how we could resolve this? or is it best to turn debugging on.

thanks for your help

Stu

 
Average of ratings: -
Picture of Robert Holt
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi

Posted this on the above tracker, 

We are having the same problem, 
Moodle 3.0.2 (Build: 20160111)
On Sever 2012 R2, IIS, MySQL, PHP 5.6.0
All Microsoft Plugging are up to date via GitHub as of 1 pm today, 
Moodle users are sync'ed from AD Via LDAP plugin,
Office 365 users are sync'ed from AD Via AzureAD connect. 
Office 365 Auth is Via onsite ADFS (2012 R2)

Users are able to sign in to Moodle and link to their Office 365 account.
Moodle attempts to create a notebook but fails to name it correctly [[notebookname]
If we rename [[notebookname]] on the users OneDrive to "Moodle Notebook" The office 365 block recognises the Moodle notebook has been created and is accessible.

All test users have their timezone and 'Select a country' set to GMT/UK.
We are unable to find another other settings that may effect this.

Any help would be great

Thanks


 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

For #3 - you mentioned you're just using connected accounts, correct? Not using OpenID Connect authentication right now? Can you take me through, step by step, the process you're using for this user? Thanks!

 
Average of ratings: -
Picture of Stuart Disney
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

Tried to replicate error and now it all works!, so don't know if it was an issue with their Azure account or its sync with our local Active Directory. Can you clarify how OPENID connect authentication is used, I thought we had to use it to authenticate to the users Azure AD account. Our current setup is that Users log into moodle with LDAP sync plus authenticating to our local AD. Initially we want to keep this the same with no syncing to Azure but just let the students access their Office 365 Notebooks,Calendar and OneDrive for Business. thanks Stu

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

There's two ways to connect to Office 365, using OpenID Connect authentication and using a "Connected account".

Using OpenID Connect authentication, the user uses OpenID Connect to log in to Moodle. This is done either through the "Office 365 Login" link on the user preferences page (click "Preferences" on the Microsoft block), through automatic user matching (in the user sync setting), or through the new user match tool, also in the settings page. If a user is using OpenID Connect authentication, it changes their Moodle authentication method - so in your case they would no longer be LDAP users.

The connected account setup is done by clicking the "Click here to Connect" link in the green connection status box, also on the user preferences page (admittedly, we need to clarify this process). Using this process, the user's authentication method to Moodle does not change, and they log in to Moodle as they always have. This process involves a simple one-time login to Azure AD, and Moodle then stores access tokens to access Office 365 features with the user. This involves no changes to the Moodle user account.

Hope that clarifies things a little!

 
Average of ratings: Useful (1)
Picture of Urpo Karhula
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,

Few problems/questions about the Office 365 -integration:

Question 1 Onenote-submission in Assignment-activity.

1. In the assignment-activity settings you can choose "OneNote submissions" as one of the submission types. When you have enabled onenote-submissions you can choose "Maximum number of uploaded OneNote pages" but this dropdownmenu is limited only to 1. 

Is this the purpose or can I add maximum number of uploaded onenotepages higher than 1 ? Is this a configuration issue on my part?


Problem 2 calendar sync

2. Should calendar events sync from Office 365 Outlook to Moodle? I only seem to get it work only from Moodle to Outlook but not otherwise. When I run cron job manually It gives an error:


Syncing events for user #50

Error: Error in API call: The time zone information is missing on the DateTimeOffset value '2016-02-04T12:14:27'. A DateTimeOffset value must contain the time zone information.


Problem 3 capability auth/oidc:manageconnection doesn't work at all

3. "The capability "auth/oidc:manageconnection" doesn't seem to work at all.

I have Microsoft-block on the Moodle front page and I have set that "Authenticated user on frontpage" is the front page role.

I prohibited auth/oidc:manageconnection from "Authenticated user on frontpage" and still users can access "Manage Office 365 connection" page without a problem and connect their Moodle account to o365 account without a problem." I'm referring to James's answer here:

https://tracker.moodle.org/browse/CONTRIB-6108

 
Average of ratings: -
Picture of Ingeborg (Inky) Chandler-Mertz
Re: OneNote, Office365 and MS Mix Plugins now available
 

I am trying to upload all the users employee ID in our Moodle system. This means updating the users, however, every time I try the login method changes from OpenID to manual. I have tried to set  auth to oidc in the CSV but it does not accept oidc as a valid auth method. All the users are currently already set to OpenID, however, if I do not add the auth method it will reset them all to manual. Anyone know what I need to do to update the one field and keep the auth as OpenID. Maybe someone knows the value I should be using?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Are you uploading users through the standard Moodle user upload feature? If you've set up the plugins and are bringing Azure AD users into Moodle, the best way is to enable the plugins' user sync feature. This is a setting in the Office 365 local plugin. This will run during your Moodle cron and create users in Moodle for each user in your Azure tenant. 

Note that this runs once per day at 1 am server time, so you may want to increase the frequency of that if you have a lot of users. See the notes in the user sync setting for more information and how to increase the frequency if needed.

 
Average of ratings: -
Picture of Ingeborg (Inky) Chandler-Mertz
Re: OneNote, Office365 and MS Mix Plugins now available
 

I am not using the sync feature, however, if I turn that on will it actually delete users that are removed from Azure. I need the deleted users to remain due to retention laws for education certificates etc. Also not all my users are Azure. I have external manual users. Will they be affected?

Thanks in advance.

 
Average of ratings: -
Picture of Ingeborg (Inky) Chandler-Mertz
Re: OneNote, Office365 and MS Mix Plugins now available
 

And never mind James. I saw that I can switch the delete feature off. You have helped me tremendously. Thank you so much.

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James, I just updated to the most recent version of the plug-ins, and I really like the excellent additions.

I haven't enabled the groups creation yet because I'm afraid of what it will do to my address book. I'm worried about my users'  confusion between a group I created in AD called "Science Teachers" and a Moodle class a particular user created, also called "Science Teachers". How can my users tell the difference? Which one is which? They would most likely both have different memberships. Can you add an option to allow us to prefix our Moodle-generated groups with something like "Moodle Course" or something similar? Maybe let us choose the prefix?

Also, what kind of "Groups" are these? AD Security Groups? Distribution Lists? The recently-developed "Office 365 Groups"? (What a truckload of confusion that latter one has caused for us! I would prefer Moodle just be creating Distribution Lists.)

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

One more thing I've found with some of my users who were previously using LDAP. After switch them to authenticate against O365, I tried to disconnecting them from O365 authentication using /auth/oidc/ucp.php?action=disconnectlogin. However, it only presented me the manual authentication option. This didn't occur with another user (they were presented with both, but fortunately the LDAP is defaulted as the option), and I have no idea why.

Since that could easily turn into an SSO disaster, I've disabled the O365 authentication for now.

Where is the prior authentication type saved, and why would it just 

A bulletproof option would be to add a setting in /admin/settings.php?section=local_o365 that would let us select the disconnect authentication type (the admin would have the list of options presented from the currently enabled authentication methods). In my case, I would select LDAP. Then, the user would click "Disconnect" and it would just say, OK, and switch them back to LDAP. No password screen, toggle, and potential for the user to make a big mess.

As an admin, I can figure out what to do with the 2 out of 800 users who are set for something other than LDAP.

Thoughts?

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

The previous authentication method is stored when the user goes through the process of switching to OpenID Connect. If an admin changes their authentication method manually using the user edit tool, or the authentication method is changed any other way than the user-facing "Switch to using Office login" method, the previous login won't be stored. From a technical perspective, the previous login information is stored in the auth_oidc_prevlogin table.

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

That's what I thought. But what's interesting is this: if I manually change a user's login type to LDAP (from whatever it was before) and then reconnect the user to O365 and log in as the user and tell Moodle to start logging the user in by O365, and then try going back to LDAP, it doesn't remember that it switched from LDAP. Shouldn't it store that?

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 
After several attempts, it seems to be remembering my last login type again. I did update all my plugins...maybe that was the problem.
 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

These are the new Office 365 groups. These are newer groups in Office and you'll likely start seeing them more and more in the Office portal/webapps. 

The created groups are actually automatically prefixed already - they will use the shortname of your Moodle site, followed by a colon and space, so if your Moodle site's shortname was "SCS LMS", the group would be called "SCS LMS: Science Teachers". This should help distinguish the groups a little. Would that serve your needs for these groups or would you need a customizable prefix for it to be useful?

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello James, thank you so much for your help. Can you please add this to the help info on the group creation process?

Yes, I would very much like to have the ability to use something other than the Moodle site short name for the prefix of the groups. You could have the textbox preset to the Moodle short name and then the user could enter something else. Although, I suppose the concern would be what would happen if someone changed the prefix...so maybe that wouldn't be a good thing. I don't know...

The concern I have about using the new Office 365 is the possible confusion about the course site vs. the Group site and the official home page for the group shifting to office instead of being in Moodle. I assure you that students get confused VERY EASILY. They will click the Group in OWA and think that's the official page for the course, when it's actually in Moodle. Then you have the teacher saying, "I posted the document" and students saying, "I didn't see it" because they only checked the group site or vice-versa. This does give me pause.

For my workflow, it would be preferable to be able to create the groups as simple distribution lists.

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

(Er, I meant, "The concern I have about using the new Office 365 Groups is the possible...")

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Thanks for the feedback on this feature - we're scoping out what to do with user groups and this helps us understand what works and what doesn't for people, please let us know if you have any other requirements/ideas. smile

 
Average of ratings: -
Picture of Peter Sercombe
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi James,

My greatest concern with the current group implementation is that all the groups created are public, and anyone can join themself up to a group. So a student enrolled in a course with an account in your o365 tenant can effectively help themselves to material and discussion within another course that they may not be enrolled in.

There needs to be either a setting to choose the privacy of the groups that are created, or set the default to private with the option of making them public after creation.

Is there a way to change the privacy of the groups? 

The only other confusion is that there's a group OneNote document, which alongside the student's personal OneNote (and if you're using the OneNote Class Notebook LTI integration) becomes a bit confusing.

I would ultimately like to see the direction of development move towards using the new "Microsoft Classroom" to perform the function that groups offers in terms of discussion board, access to a OneNote Notebook, and shared files. Is that on the cards?

 
Average of ratings: -
Picture of Jared Pickerell
Re: OneNote, Office365 and MS Mix Plugins now available
 
James,
As Peter stated, I would really like to see the Moodle/Office 365 integration use the "Microsoft Classroom" Office 365 groups instead of creating their own Office 365 groups. Otherwise, we get some nasty duplication of groups that is going to be very confusing. Is this on the roadmap?
 
Average of ratings: -
Picture of Angel Arias Sastre
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello,

I have Moodle 2.8 and the most recent version of the plug-ins.

When a Moodle' user click on "Connect to Office 365" in a course in the block of microsoft, then appear the link "Click here to connect" and then appear the error: 

"The OpenID user authenticated connection is already connected to a user account Moodle"

What's the problem, if the user has never been connected before?


Thanks

 
Average of ratings: -
Picture of DR LMS
Re: OneNote, Office365 and MS Mix Plugins now available
 

Angel, did you set the plugin to sync your users? If so, that may be why the user is already connected.

 
Average of ratings: -
math
System API User problem (Re: OneNote, Office365...)
 

Greetings,

I am having trouble getting past setting the System API User, and and am hoping for some insight or instruction.

From the Microsoft Office 365 Integration page, I do the following:

  • Click the "set user" button in the Setup section
  • Sign in on the resulting Microsoft login page, using an admin account provided by our O365 administrator

I am then presented with a list of permissions requested:

________

App publisher website: engage.mcpss.com
MoodleTest2 needs permission to:
You're signed in as: usernamehere@organization.onmicrosoft.com (admin)
If you agree, this app will have access to the specified resources for all users in your organization. No one else will be prompted. More details
___________

When I click "Accept", I am returned to the home page of our Moodle site, with no apparent change having taken place. Repetition brings the same result each time.

Our O365 administrator configured the app in Azure (three times. the last after I reinstalled and updated all of the O365 plugins), and provides me with the new ID and key each time.

I believe that we are following the documentation (https://docs.moodle.org/29/en/Office365)

Full disclosure - I did receive update notifications for several of the O365 plugins two day ago. and we have not installed them yet. We are using the immediately previous versions (updated just last week) on Moodle 2.9.4+ build 20160218 (also updated recently  - soon to be updated to fix MDL-53249. My timing has been really off lately).

We were having the same problem before the latest plugin updates were released.

I am not sure exactly where to jump into this discussion, so am replying directly to the post that started it all.

Any help is appreciated.

Thanks,

David

 
Average of ratings: -
Picture of James McQuillan
Re: System API User problem (Re: OneNote, Office365...)
Group Core developersGroup Plugin developers

Hi David,

So to confirm, when you're returned to Moodle, the system API user setting still reports that it is not set ?

- James

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 

James,

Hello! And thank you for the rapid response.

Yes - after clicking "accept" on the page asking to grant the list of permissions, the next page that loads is my Moodle site's homepage. Returning to the o365 settings page shows that the system API user has not been set.

Thanks again - if I can give more information I'll be glad to.

David

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

A couple questions:

1) Are you logged in to an Office-365 connected user when you attempt to set the system API user? When you're returned to your Moodle homepage, are you still logged in to the same account?

2) Can you purge your Moodle cache and clear your browser caches and try again?

3) If (2) doesn't work, can you enable the "Record debug messages" setting in both the OpenID Connect authentication plugin and the Office 365 local plugin and try setting the system API user again. If it still does not set, go to Site Administration > Reports > Logs, Change "All activities" to "SIte errors", and click "Get these logs". If you see anything related to OpenID Connect or Office 365, can you send it to me? If there's sensitive information in the logs you can email me at james.mcquillan@remote-learner.net

Thanks!

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 


James,

  • I am logged into Moodle as myself. I am the main admin user.
  • When I am returned to the Moodle home page, after trying to set the system API user (the URL is https://login.microsoftonline.com/common/oauth2/authorize?respo… and I sign in using the O365 admin account I was given*, and accept all of the requested permissions), I am still logged into Moodle as myself.
  • I can log into my account in our O365 service with the same credentials I use to log into Moodle, but I am not an admin in O365.

*Our O365 admin gave me the ID and password for an admin O365 account. This account “exists only in the cloud, outside our domain” (O365 admin’s words). The last time he deleted and re-added the app in Azure, he assigned it to this O365 admin account.

Here are my updates and answers to your questions and suggestions:

  • Site updated to latest weekly build of 2.9.4+
  • Microsoft plugins updated during this process
  • Purged Moodle caches (Site Admin > Development > Purge all caches)
  • Cleared browser cache (Firefox)

Same results

  • Verified “record debugging”enabled for both plugins (it was all along)
  • Ran logs for site errors:


Lots of this one

Microsoft Office 365 Integration
API failure
local_o365\oauth2\token::instance: Cannot retrieve a token for the base resource. Data: (null

(a few days ago, I changed the Refresh system API user refresh token scheduled session to run every minute, thinking that it might help)


At least one of these (user column indicated a teacher name):

Microsoft Office 365 Integration
API failure
\local_o365\feature\usergroups\observers::handle_group_member_added: Couldn't construct unified api client because we didn't have a system API user token. Data: (null)



And at least one of the:

Microsoft Office 365 Integration
API failure
\local_o365\feature\usergroups\observers::handle_group_member_removed: Couldn't construct unified api client because we didn't have a system API user token. Data: (null)
cli



I do appreciate the attention to this! If I can supply any more information or screen shots of any of the settings, please let me know.

Thank you, James.

David

 
Average of ratings: -
math
Re: OneNote, Office365 and MS Mix Plugins now available
 
James,

I don't have a good explanation of how I missed the following, but here are several other messages from the site errors logs that might be helpful (these actually list "debug message" as the event type). There are many instances of several general errors. I've included screenshots of, I think, every major type. I am going to take advantage of your offer and email the log files directly to you. These are all from today. I can't tell that any are generated at the moment that I try to set the System API User. There doesn't seem to be.

Thanks again - and in advance for any and all help!

David






These included a student name (same name in each):









 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Thanks David - sent you an email.

 
Average of ratings: -
Picture of Ian McAll
Re: OneNote, Office365 and MS Mix Plugins now available
 

I have exactly these errors can I get the solution please

 
Average of ratings: -
Picture of Alex Varsakopoulos
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,

tried to upgrade all MS plugins but I'm getting this message on one installation, that of onenote repository:

No version found to fulfill the dependency requirements: Microsoft OneNote (repository_onenote > 2015111902).

Any ideas?

Thank you,

Alex

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Alex, 

Sorry about that, looks like that plugin's newest version didn't make it to the plugin database - I have just resolved this so you should be good to go.

 
Average of ratings: -
Picture of Alex Varsakopoulos
Re: OneNote, Office365 and MS Mix Plugins now available
 
Hi James,

That went through, but now when I try to update the database  it hangs when it gets to
"OneNote submissions" I think.  The same thing happens to 3 different instances of moodle.

Cheers,

Alex
 
Average of ratings: -
Picture of Alex Varsakopoulos
Re: OneNote, Office365 and MS Mix Plugins now available
 

Thank you gentlemen for upgrading the plugins.

Everything works now.

Alex

 
Average of ratings: -
Picture of Daemon Hunt
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hello, would you be able to describe this error please? In our testing, everything seems to be connecting to Azure fine, don't seem to be any noticeable problems, and yet on the local plugin page (version 2015012724 for Moodle 2.8+) we are seeing this:


Just to be sure, we have turned on all the Windows Azure Active Directory options for our testing:

If I could have some feedback about this please, would be most appreciative. Should we just ignore the error? (We are anyway at this stage).

Great plugin by the way, just not ready for prime-time in our organisation smile

 
Average of ratings: -
Picture of Nick Truchman
Re: OneNote, Office365 and MS Mix Plugins now available
 

Same for me :

errorMissing Permissions:
Windows Azure Active Directory

  • user_impersonation
  • Directory.Read
On Moodle 3.0.3 with this local plugins version :
Microsoft Account2015011605
Microsoft Office 365 Integration2015011638
Microsoft OneNote2015011609
Microsoft Services2015011610
Office 365 Integration2015011619
The authentication works fine now but no Office365 blocks are visible nor other stuff :'(

Thanks for your help !

Nick

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Hi Nick, 

Nothing to worry about there. From time to time Azure changes the names of their permissions on us. The tool checks for specific permissions based on names and when the names change, you get them reported back as missing like this. Luckily Azure migrates the configured permissions so everything should still work fine, it's just the setup checking tool itself having a problem.

As for blocks not being visible, the Microsoft block has to be added manually to your Moodle site - this is done the same way you'd add any other Moodle block. 

Thanks for the reports!

 
Average of ratings: -
Picture of Daemon Hunt
Re: OneNote, Office365 and MS Mix Plugins now available
 

Cheers, James ;)

 
Average of ratings: -
Picture of James McQuillan
Re: OneNote, Office365 and MS Mix Plugins now available
Group Core developersGroup Plugin developers

Nothing to worry about there. From time to time Azure changes the names of their permissions on us. The tool checks for specific permissions based on names and when the names change, you get them reported back as missing like this. Luckily Azure migrates the configured permissions so everything should still work fine, it's just the setup checking tool itself having a problem. We've updated this in our dev version and will release it with the next release in the next couple days.

 
Average of ratings: -
Picture of Nick Truchman
Re: OneNote, Office365 and MS Mix Plugins now available
 
Ok, super fine, thank you James.

Nick
 
Average of ratings: -
Picture of Francisco Nieto
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi,

Looking for help....I have set up the Office 365 integration, but I am having a little issue. Any  user with administrator role can log into  Moodle, and on the "Microsoft block", they will see the link " Connect to Office 365"; however, teachers and students log into Moodle and they cannot  see the "Connect to Office 365" link.

My Moodle version is latest 3.0 ( I have tested with 2.8 also). The login flow is "Username/Password Authentication", I have checked the system roles and I do not see any role to prevent this link to show on teacher and students. I have also installed the profile plugin so the studetn/teacher can be redirect to "Office 365 / Moodle Control panel", but they do not get the "Manage connection" link.

Am I missing any setting to allow the teacher and students to manage their connections? Is this possible at teacher/student role?

Any help will be greatly appreciate...thanks

Sincerely,
Francisco


 
Average of ratings: -
Picture of Paul Clarke
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi

We are loving the new block, especially with the link to OneDrive etc.

Is there a way (or possibly an idea for development) for a link to go to their e-mail? or an indicator showing how many unread messages they have with the link to their mail?

It seems silly to have an Office365 Plugin that does not have link to Mail.

 
Average of ratings: -
Picture of Peter Sercombe
Re: OneNote, Office365 and MS Mix Plugins now available
 
I would concur. I've created an HTML block with some of those links for our users already (I made this block before the latest release of the Microsoft block, hence the duplicate OneDrive links).



 
Average of ratings: -
Picture of Paul Clarke
Re: OneNote, Office365 and MS Mix Plugins now available
 

I assume the links are simply linking to outlook.microsoft.com and your realm? The users then need to login to Office 365?



 
Average of ratings: -
Picture of Peter Sercombe
Re: OneNote, Office365 and MS Mix Plugins now available
 

More or less, except that we have users logging into Moodle via oidc/office365 so they're already logged in to the apps. 

I've actually created a custom login block to achieve this. Just an image in a html block with a link to https://moodleurl.com/auth/oidc.

The standard login form also exists on our site for now, but planning to build a full custom login page in the near future.

 
Average of ratings: -
Picture of Nick Truchman
Re: OneNote, Office365 and MS Mix Plugins now available
 

Hi everyone,

I can't have this "Microsoft block" displayed in my platform after authentication.

The doc says : "Ensure the Microsoft block has been added to a page in Moodle (for example, the Moodle dashboard)".

But how do I get that ?

Thanks for your help,

Nick

 
Average of ratings: -
Picture of Rene Ouellette
Signing key rollover in Azure Active Directory
 

Hi Gents,

I am wondering if the Signing key rollover in Azure AD will affect the configuration of our Open ID authentication?

https://azure.microsoft.com/en-us/documentation/articles/active-directory-signing-key-rollover/?WT.mc_id=azurebg_email_Trans_1150_Azure_AD_Certificate_Rollover_EN%20ONLY#other 


Thanks,


Rene

 
Average of ratings: -
Picture of Kyle Vinagro
Re: Signing key rollover in Azure Active Directory