Events.AuthorizationStatusForEntityType
---------------------------------------

Returns the authorization status for the given entity type.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Events](component_Events.md) | [6.2](newinversion62.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "Events.AuthorizationStatusForEntityType"; Type ) 

**MBS**( **"Events.AuthorizationStatusForEntityType";** /\* Returns the authorization status for the given entity type. \*/  
**$Type**) /\* Which entity type you like to check: Event or Reminder.e.g. "Event" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Type | Which entity type you like to check: Event or Reminder. | "Event" |

### Result

Returns status or error.

### Description

Returns the authorization status for the given entity type.  
You can check and see if your solution is allowed to use the calendar.  
  
Value is NotDetermined, Restricted, Denied or Authorized.  
You can use [Events.RequestAccessToEntityType](EventsRequestAccessToEntityType.md) to request access.  
### Examples

Query authorization:

 Set Variable \[$r ; Value:MBS ("Events.AuthorizationStatusForEntityType"; "Reminder")\]  
If \[MBS ("IsError")\]  
 Show Custom Dialog \["We have a problem"; MBS ("[Text.RemovePrefix](TextRemovePrefix.md)"; $r ; "\[MBS \] ")\]  
Else If \[$r = "NotDetermined"\]  
 Set Variable \[$r ; Value:MBS ( "[Events.RequestAccessToEntityType](EventsRequestAccessToEntityType.md)"; "Reminder" )\]  
 If \[$r = "Wait"\]  
 #dialog is showing.  
 Else If \[$r = "OK"\]  
 Show Custom Dialog \["Success"; "We are authorized and ready to go."\]  
 Else  
 Show Custom Dialog \["We have a problem"; $r \]  
 End If  
Else If \[$r = "Restricted"\]  
 Show Custom Dialog \["Success"; "We are authorized for a restricted access and ready to go."\]  
Else If \[$r = "Denied"\]  
 Show Custom Dialog \["Problem"; "We are denied for calendar access. Please go to system preferences and enable us."\]  
Else If \[$r = "Authorized"\]  
 Show Custom Dialog \["Success"; "We are authorized and ready to go."\]  
Else  
 Show Custom Dialog \["We have a problem"; $r \]  
End If  
### See also

- [Events.Initialize](EventsInitialize.md)
- [Events.RequestAccessToEntityType](EventsRequestAccessToEntityType.md)
- [Events.RequestFullAccessToEvents](EventsRequestFullAccessToEvents.md)
- [Events.RequestFullAccessToReminders](EventsRequestFullAccessToReminders.md)
- [Events.RequestWriteOnlyAccessToEvents](EventsRequestWriteOnlyAccessToEvents.md)
- [IsError](IsError.md)
- [Text.RemovePrefix](TextRemovePrefix.md)

### Example Databases

- [Mac and iOS/Events/Events Changes](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Changes.shtml#1ScriptAnchor_)
- [Mac and iOS/Events/Events Create Event](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Create%20Event.shtml#2ScriptAnchor_)
- [Mac and iOS/Events/Events Create Reminder](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Create%20Reminder.shtml#2ScriptAnchor_)
- [Mac and iOS/Events/Events Import](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Import.shtml#3ScriptAnchor_)
- [Mac and iOS/Events/Events Sync](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Sync.shtml#2ScriptAnchor_)

### Blog Entries

- [macOS Privacy and FileMaker](https://www.mbsplugins.de/archive/2020-08-11/macOS_Privacy_and_FileMaker/monkeybreadsoftware_blog_filemaker)
- [Calendar access in FileMaker 18](https://www.mbsplugins.de/archive/2019-07-12/Calendar_access_in_FileMaker_1/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 3/2020, Seite 37](https://filemaker-magazin.de/neuigkeit/4096-Appetithappen-FMM_202003)

This function checks for a license.

Created 10th March 2016 , last changed 13th March 2016

  
[Events.Alarm.Type](EventsAlarmType.md) - [Events.Calendar.AllowsContentModifications](EventsCalendarAllowsContentModifications.md)

[HTML Version](EventsAuthorizationStatusForEntityType.shtml)