Invalid Microsoft Teams not working on Stable


mikilinux

Members
8 Jan 2019
22
15
Hi!
I hate Microsoft Teams app, because it reminds me of my job even when I'm on holiday.. BUT! It doesnt work. It crashes instantly when I open it, even if i clear data and cache. Tried to uninstall it.. to installa beta version.. Same error stacktrace..

java.lang.SecurityException: getCallState requires READ_PHONE_STATE for apps targeting API level 31+... etc etc..

I think they should update the app. Skype works.. Outlook works..
I'm on xaga, last stable rom :)
 
  • Like
Reactions: Alexbo
I couldn't use Teams anymore either, and was unable to change the permissions.
Yes, they should. Nothing we can do from our side.
Long-tap the app icon -> App info -> Permissions -> Get device info -> Always allow
I couldn't do that - I was unable to change the permission there (no way to choose anything), and the work profile apps wouldn't show through settings -> Apps.
I uninstalled and reinstalled countless times, gave the Company Portal (Intune) all permissions, nothing helped.
For the last weeks, I used two phones since I couldn't use Teams on my Xiaomi anymore, until I found the solution in another thread this morning:

Solution: In phone's settings => Manage Apps => Apps => Open 3-dots menu (top-right) and select option to show all apps/system-apps => Find and select 'Permissions' app (this app name can be translated to your system language) then use "Clear all data" button

I guess the permissions app locked / took over the permissions somehow?
If you can't assign the permission through App-Info, try the above. Just adding this for future reference.
 
I have same issue since few weeks on Mi 10 latest possible beta.
Réinstall teams don't fix.
Beta teams don't fix

Finally it works after I found out this post.
"empty response" for device information permission was the faulty setting, I switched to always allow
 
I have the exact same error (java.lang.SecurityException: getCallState requires READ_PHONE_STATE for apps targeting API level 31+...) on a mi 10 ultra with MIUI 13 stable rom (latest).
The problem is that teams is installed in work profile and the solution provided by @Igor Eisberg (Long-tap the app icon -> App info -> Permissions -> Get device info -> Always allow) does not work there because the options are not available (they are there in the personal profile, but not in work profile)

How to fix this?
 
Last edited:
I have the exact same error (java.lang.SecurityException: getCallState requires READ_PHONE_STATE for apps targeting API level 31+...) on a mi 10 ultra with MIUI 13 stable rom (latest).
The problem is that teams is installed in work profile and the solution provided by @Igor Eisberg (Long-tap the app icon -> App info -> Permissions -> Get device info -> Always allow) does not work there because the options are not available (they are there in the personal profile, but not in work profile)

How to fix this?
See my post here https://xiaomi.eu/community/threads/microsoft-teams-not-working-on-stable.67542/post-679915 and the solution here: https://xiaomi.eu/community/threads...missions-continues-to-fail.62048/#post-617450
 
Unfortunatly that didn't work for me. All apps lost their permissions, that part worked, but the options for teams in the work profile stayed the same.
It was working in de DEV version of MIUI 13 though. I went to stable for future updates, but since then I haven't been able to get teams to work in the work profile.
 
Unfortunatly that didn't work for me. All apps lost their permissions, that part worked, but the options for teams in the work profile stayed the same.
It was working in de DEV version of MIUI 13 though. I went to stable for future updates, but since then I haven't been able to get teams to work in the work profile.
I found a workaround for that as I had the same problem. So what i did, I turned Work profile on, but installed Teams on the Personal profile. Once installed, I did the trick (Long-tap the app icon -> App info -> Permissions -> Get device info -> Always allow). Since VPN from Work profile was up and running, I was able to register and launched the app no probs. (it will ask you to install Intune bit on your personal profile as well)
 
I found a workaround for that as I had the same problem. So what i did, I turned Work profile on, but installed Teams on the Personal profile. Once installed, I did the trick (Long-tap the app icon -> App info -> Permissions -> Get device info -> Always allow). Since VPN from Work profile was up and running, I was able to register and launched the app no probs. (it will ask you to install Intune bit on your personal profile as well)
Yeah, all works well, the only drawback is that when Work mode is off, the Teams is still up and running, so you need to put yourself to "Appear Offline" mode not to get disturbed.
 
this is a valid bug, however the title could be a little bit more precise by quoting

Microsoft Teams not working on Stable in Work Profile (Intune/Company Profile)

outside work profile you can use hidden settings or temporarily disable miui optimization and allow "Get Device Info" permission for Teams.

Teams for some reason after last few updates requires to be able to access this info, so blank response by Permission Manager will prevent it from continue running and just force closes or hang.

until some real solid solution came from either MS or Xiaomi, one can only do this:

1. Disable MIUI optimization in Developer Setting
2. Clear data/cache of Teams app in Work Profile
3. Open the Company Profile app and check your device setting compliance.
4. Open Teams in work profile and login, since Permission Manager is not running as MIUI optimization is disabled, it will be able to read device info and store it somewhere within the app data. You should now be able to use Teams.
5. MIUI optimization can now be enabled back, and Teams should be usable until the app decided to read your device info again.

Good luck, the PM is really overzealous with no option to whitelist certain apps in work profile. I guess this bug is more on Xiaomi side, however M$ is also a PITA as Outlook could do away without reading such info, it just works on the get go.
 
this is a valid bug, however the title could be a little bit more precise by quoting

Microsoft Teams not working on Stable in Work Profile (Intune/Company Profile)

outside work profile you can use hidden settings or temporarily disable miui optimization and allow "Get Device Info" permission for Teams.

Teams for some reason after last few updates requires to be able to access this info, so blank response by Permission Manager will prevent it from continue running and just force closes or hang.

until some real solid solution came from either MS or Xiaomi, one can only do this:

1. Disable MIUI optimization in Developer Setting
2. Clear data/cache of Teams app in Work Profile
3. Open the Company Profile app and check your device setting compliance.
4. Open Teams in work profile and login, since Permission Manager is not running as MIUI optimization is disabled, it will be able to read device info and store it somewhere within the app data. You should now be able to use Teams.
5. MIUI optimization can now be enabled back, and Teams should be usable until the app decided to read your device info again.

Good luck, the PM is really overzealous with no option to whitelist certain apps in work profile. I guess this bug is more on Xiaomi side, however M$ is also a PITA as Outlook could do away without reading such info, it just works on the get go.
How to "Disable MIUI optimization in Developer Setting" in XEU rom?
 
Yes, they should. Nothing we can do from our side.
Long-tap the app icon -> App info -> Permissions -> Get device info -> Always allow
Thank you.
Cant' believe it was such a simple thing...
I must've reinstalled it a hundred times, and cleared the cache countless others.

this works!!!
 
this is a valid bug, however the title could be a little bit more precise by quoting

Microsoft Teams not working on Stable in Work Profile (Intune/Company Profile)

outside work profile you can use hidden settings or temporarily disable miui optimization and allow "Get Device Info" permission for Teams.

Teams for some reason after last few updates requires to be able to access this info, so blank response by Permission Manager will prevent it from continue running and just force closes or hang.

until some real solid solution came from either MS or Xiaomi, one can only do this:

1. Disable MIUI optimization in Developer Setting
2. Clear data/cache of Teams app in Work Profile
3. Open the Company Profile app and check your device setting compliance.
4. Open Teams in work profile and login, since Permission Manager is not running as MIUI optimization is disabled, it will be able to read device info and store it somewhere within the app data. You should now be able to use Teams.
5. MIUI optimization can now be enabled back, and Teams should be usable until the app decided to read your device info again.

Good luck, the PM is really overzealous with no option to whitelist certain apps in work profile. I guess this bug is more on Xiaomi side, however M$ is also a PITA as Outlook could do away without reading such info, it just works on the get go.
I've the same issue, but my M13U is not rooted, so seems I'm unable to use this. Any other ways to get around this problem?
 
I've the same issue, but my M13U is not rooted, so seems I'm unable to use this. Any other ways to get around this problem?
What do you mean you're not rooted? You don't seem to need root to follow those steps.
I can't find the option for the MIUI optimization though.
 
Last edited:
this is a valid bug, however the title could be a little bit more precise by quoting

Microsoft Teams not working on Stable in Work Profile (Intune/Company Profile)

outside work profile you can use hidden settings or temporarily disable miui optimization and allow "Get Device Info" permission for Teams.

Teams for some reason after last few updates requires to be able to access this info, so blank response by Permission Manager will prevent it from continue running and just force closes or hang.

until some real solid solution came from either MS or Xiaomi, one can only do this:

1. Disable MIUI optimization in Developer Setting
2. Clear data/cache of Teams app in Work Profile
3. Open the Company Profile app and check your device setting compliance.
4. Open Teams in work profile and login, since Permission Manager is not running as MIUI optimization is disabled, it will be able to read device info and store it somewhere within the app data. You should now be able to use Teams.
5. MIUI optimization can now be enabled back, and Teams should be usable until the app decided to read your device info again.

Good luck, the PM is really overzealous with no option to whitelist certain apps in work profile. I guess this bug is more on Xiaomi side, however M$ is also a PITA as Outlook could do away without reading such info, it just works on the get go.
Not sure at what side it was fixed, but I have now my work profile Teams working.
As I mentioned before, few months ago after failing to get Teams working on work profile, I installed it on my personal profile. Very recently, being in work profile, I accidently clicked on Teams and it worked!! It kept working even after I deinstalled Teams on personal profile.
 
Unfortunately it doesn't work for me (k60), Teams in work profile is still crashing and I don't find in the last MIUI how to "disable MIUI optimization in Developer Setting", the old method doesn't work anymore.
@jebon @Okaban @Waker @newphonewhodis @Avaessen @Dhala @MeiGuddet have you managed to solve it?
Thank you!
It just started working out of nowhere a month or so ago.
I followed a lot of the instructions here to reset the notification permissions for the whole phone and such. I did this but it still didn't work, and I had to give permissions to all my apps once again to get the notifications... Eventually I gave up.

Then after a while I got an email on my Professional Profile Outlook with a link to teams. Clicked on it since I had forgotten it wasn't working and to my surprise, it asked for my user and password without crashing.
Not sure what I did to make it work but I followed probably all the troubleshooting people say here in the comments.

I wouldn't say mine is working 100% though. I get an error message on the top of my teams app saying the battery saver is preventing it from running as a background service and as such it sometimes fails to show me the notifications...
But it does work 70~80% of the time I'd say.
That's good enough for me :/ Hoping the new MIUI will fix it.
 
Had "java.lang.SecurityException: getCallState requires READ_PHONE_STATE" error on HyperOS. Solved by "App Info" -> "Permissions" -> "Phone" -> "Return blank messages" -> <Turned off>. For some reason this was enabled when installed even when clearing cache, reinstalling, resetting permissions app data etc. seems to be the default... Hopefully this helps someone.
 
  • Like
Reactions: Waker