VMware Workspace ONE Community
Shoopity
Contributor
Contributor

Unknown Apps

High, I'm relatively new to WS1.  I inherited our setup from my predecessor.  Over the last 2 months, I've noticed a build up of Unknown apps.  That is, if I go to Apps & Books -> Native -> Purchased, ther's regularly a bunch of Apps with a name of Unknown; this is a per-OU thing.

Apparently my predecessor had an SQL query that removes these apps, which I've been running ever couple of weeks.  But I'm curious as to how these "apps" appear?  Are we doing something incorrectly that causes these apps to appear?  Does anyone know where my predecessor got this SQL query, or do you think he was just that good at SQL that he wrote it himself?

Labels (1)
Reply
0 Kudos
6 Replies
KevinKrumm
Enthusiast
Enthusiast

I see the same here - but i never seen a SQL script to remove them

Could be related to this https://kb.vmware.com/s/article/77545?lang=en_US&queryTerm=Custom%20B2B

 

I'm running 21.0.5.27 but im still seeing those unknown apps and vpp syncing not working from time to time. 

Reply
0 Kudos
Shoopity
Contributor
Contributor

I'm currently on 21.5.0.4

That KB definitely looks close, though my app type just says Custom, not Custom B2B.  We've got a lot of hands in the pot, so it could be a matter of people not doing something correctly.  Or it could be a bug.  Thank you for providing the KB though.

I've attached the script I use.  Like I said, I don't know where this came, so run at your own risk.

begin tran
Declare
--@VppAccountID    INT = 15,  ---vppaccount
@CoreUserID        INT = 478 ---one admin coreuserid
-- @CoreUserID 478 = admin ID number as found in the console for an admin account.  Head to https://mdmconsole.asd20.org/AirWatch/#/Admin/List, find a Global admin, and the end of the URL is the ID number.  E.G. https://mdmconsole.asd20.org/AirWatch/Admin/Actions/Edit/478


DECLARE @REAID INT
DECLARE @ConcurrencyID UNIQUEIDENTIFIER 

IF OBJECT_ID('tempdb..#REAIDs', 'U') IS NOT NULL
    DROP TABLE #REAIDs;
 
 
    CREATE TABLE #REAIDs
                    (RecommendedExternalApplicationID INT PRIMARY KEY, ConcurrencyID UNIQUEIDENTIFIER)
    --REA's that are set to IsLicensed purchaseType and need to be deleted 
    INSERT INTO #REAIDs
    SELECT lc.RecommendedExternalApplicationID, ConcurrencyID
    FROM deviceApplication.VppLicenseCount lc
    INNER JOIN deviceApplication.RecommendedExternalApplication rea
        ON lc.RecommendedExternalApplicationID = rea.RecommendedExternalApplicationID
    WHERE PurchaseType = 2 and producttype = 3 and applicationname =''  

 --this is for 1810+
 DECLARE @RecommendedExternalApplications [deviceApplication].[RecommendedExternalApplicationIdAndConcurrency_DataType]

--Delete REA's with PurchaseType of 2 and if it's an unknown app
    WHILE EXISTS(SELECT 1 FROM #REAIDs)
    BEGIN    
  --this is for 1810+
  INSERT INTO @RecommendedExternalApplications(RecommendedExternalApplicationID, ConcurrencyID)
        SELECT TOP 100 RecommendedExternalApplicationID, ConcurrencyID
        FROM  #REAIDs       
 
        EXEC deviceApplication.RecommendedExternalApplication_Delete @RecommendedExternalApplications = @RecommendedExternalApplications, @CoreUserID = @CoreUserID
 
        DELETE rea1 from #REAIDs rea1
  INNER JOIN @RecommendedExternalApplications rea2
      ON rea1.RecommendedExternalApplicationID = rea2.RecommendedExternalApplicationID

  DELETE FROM @RecommendedExternalApplications
    END

--rollback tran
commit tran

 

Reply
0 Kudos
Shoopity
Contributor
Contributor

Some more information:

These apps appear any time when someone clicks Sync Assets for Purchased Apps.  I've been told it happens because these are left over app licenses for apps that no longer exist, e.g. when a dev pulls an app from the App Store.  But because ASM still has licenses for them, they come over.

But, I can't find these apps in ASM.  I'm not even sure what these apps are.  I can use SQL to find the ExternalStoreAppID, which seems to coincide with the URL of an app.  E.G. in the SQL database, there's an entry for an app that has the ExternalStoreID of 1196524622; if I plug that into the URL of an app store app, https://apps.apple.com/fi/app/id1196524622, it comes back with Minecraft: Education Edition, which is correct.  Unfortunately, for these null/Uknown apps, putting in those ExternalStoreID numbers results in nothing.  Obviously, if these apps are no longer around.

But, if they're no longer around, how do I remove them from ASM?  Or, how do I get WS1 to stop pulling apps that have no other information to them?

Reply
0 Kudos
AaronVanNorman
Contributor
Contributor

Hopefully I'm understanding what you're trying to do.  Also, I don't have access to Apple School Manager but am familiar with the Apple Business Manager - which I'm assuming is very similar.  Here's how our company has chosen to handle the apps we no longer want pulled into WS1.  

1. In ABM we've created a new location and named it Retired Apps.

2. We then go to the Apps & Books section in ABM and find/select any apps we no longer want to see in WS1.

3. We then use the Transfer option to transfer all of the licenses from the production location in ABM to the new Retired Apps location.

4. We then run a sync in WS1 and the apps that had their licenses moved to the new location no longer show in WS1.  The apps do still show in ABM, but not in WS1.  

Reply
0 Kudos
Shoopity
Contributor
Contributor

I've seen a couple other places that suggest this too.  The problem I'm having is, I don't know which apps are "gone".  I believe these are apps that are no longer in the Apple Apps store (lets say the dev went out of business), but for licensing reasons, they remain in ASM (or ABM).  The problem is, I don't know what these apps are, since they don't exist in the app store and as far as I've seen, there's  no indicator that shows as such.

I suppose I could go through all 800+ apps, click on View Details for the app, and if the App Store page doesn't load, I can assume it doesn't exist anymore?

DimitrijPrudkij
Enthusiast
Enthusiast

I receive as "solution"  create a new token and move your apps which are in use to a new token, then deploy it 🙂 🙂 🙂 ......

Of course....

 

I try to delete this "unknown" apps in sql but after a sync in ws1 I see all unknows apps again.

Reply
0 Kudos