Unable to create an App-V 5.0 package from an Office 365 installation source

While creating an App-V 5.0 package from an Office 365 installation source, you might see this error:
The ‘flattener.log’ gives the following information:


Flattener.exe : ERROR : | 6/2/2018 1:29:18 PM | P:444 | T:1 | Packaging FAILED: The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
Exception (outer): The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
ST (outer): at Microsoft.ApplicationVirtualization.Packaging.PackagingEngine.b__14(Exception exception)
at Microsoft.ApplicationVirtualization.Packaging.ExceptionGuard`1.Guard(Action logStart, Action execute, Action logEnd, Action`1 exceptionAction)

The issue is that you are logged on with an account name that has more than 8 characters. There are two possible solutions:

  • create an account name that has 8 characters or less… Make sure the newly created account name is a member of the local group administrators.
  • create C:\TEMP and assign the environment variable %TEMP% to it.